[HttpClient] fix unregistering the debug buffer when using curl

This commit is contained in:
Nicolas Grekas 2019-06-04 08:38:41 +02:00
parent 2438b1422a
commit 4fce813ed0
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;