Skip to content

Commit 57e4fb8

Browse files
committed
bug #60295 [HttpClient] do not lose response information when truncating the debug buffer (xabbuh)
This PR was merged into the 7.3 branch. Discussion ---------- [HttpClient] do not lose response information when truncating the debug buffer | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | | License | MIT Commits ------- 1771ebd325f do not lose response information when truncating the debug buffer
2 parents 3becd20 + 7d5c652 commit 57e4fb8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Response/CurlResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ public function getInfo(?string $type = null): mixed
205205
{
206206
if (!$info = $this->finalInfo) {
207207
$info = array_merge($this->info, curl_getinfo($this->handle));
208-
$info['url'] = $this->info['url'] ?? $info['url'];
209208
$info['redirect_url'] = $this->info['redirect_url'] ?? null;
210209

211210
// workaround curl not subtracting the time offset for pushed responses
@@ -221,6 +220,7 @@ public function getInfo(?string $type = null): mixed
221220
rewind($this->debugBuffer);
222221
ftruncate($this->debugBuffer, 0);
223222
}
223+
$this->info = array_merge($this->info, $info);
224224
$waitFor = curl_getinfo($this->handle, \CURLINFO_PRIVATE);
225225

226226
if ('H' !== $waitFor[0] && 'C' !== $waitFor[0]) {

0 commit comments

Comments
 (0)