Skip to content
Permalink
Browse files

bug #32011 [HttpClient] fix closing debug stream prematurely (nicolas…

…-grekas)

This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] fix closing debug stream prematurely

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

@ElGecko76 can you please confirm this fixes the issue for you?
I'm not able to reproduce so I can't myself. Thanks.

Commits
-------

21857a1 [HttpClient] fix closing debug stream prematurely
  • Loading branch information...
fabpot committed Jun 13, 2019
2 parents d74f389 + 21857a1 commit e63577500cc2cdb60fa2c02952e86b88771739e0
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/Symfony/Component/HttpClient/Response/CurlResponse.php
@@ -168,8 +168,8 @@ public function getInfo(string $type = null)
rewind($this->debugBuffer);
$info['debug'] = stream_get_contents($this->debugBuffer);
curl_setopt($this->handle, CURLOPT_VERBOSE, false);
fclose($this->debugBuffer);
$this->debugBuffer = null;
rewind($this->debugBuffer);
ftruncate($this->debugBuffer, 0);
$this->finalInfo = $info;
}
}

0 comments on commit e635775

Please sign in to comment.
You can’t perform that action at this time.