8000 bug #32011 [HttpClient] fix closing debug stream prematurely (nicolas… · symfony/symfony@e635775 · GitHub
[go: up one dir, main page]

Skip to content

Commit e635775

Browse files
committed
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
2 parents d74f389 + 21857a1 commit e635775

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/HttpClient/Response/CurlResponse.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ public function getInfo(string $type = null)
168168
rewind($this->debugBuffer);
169169
$info['debug'] = stream_get_contents($this->debugBuffer);
170170
curl_setopt($this->handle, CURLOPT_VERBOSE, false);
171-
fclose($this->debugBuffer);
172-
$this->debugBuffer = null;
171+
rewind($this->debugBuffer);
172+
ftruncate($this->debugBuffer, 0);
173173
$this->finalInfo = $info;
174174
}
175175
}

0 commit comments

Comments
 (0)
0