bug #31832 [HttpClient] fix unregistering the debug buffer when using curl (nicolas-grekas)

This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] fix unregistering the debug buffer when using curl

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #31803
| License       | MIT
| Doc PR        | -

Commits
-------

4fce813ed0 [HttpClient] fix unregistering the debug buffer when using curl
This commit is contained in:
Fabien Potencier 2019-06-04 09:03:28 +02:00
commit f6a6fb6834
1 changed files with 1 additions and 0 deletions

View File

@ -167,6 +167,7 @@ final class CurlResponse implements ResponseInterface
if (!\in_array(curl_getinfo($this->handle, CURLINFO_PRIVATE), ['headers', 'content'], true)) {
rewind($this->debugBuffer);
$info['debug'] = stream_get_contents($this->debugBuffer);
curl_setopt($this->handle, CURLOPT_VERBOSE, false);
fclose($this->debugBuffer);
$this->debugBuffer = null;
$this->finalInfo = $info;