bug #40538 [HttpClient] remove using $http_response_header (nicolas-grekas)
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpClient] remove using $http_response_header
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Spotted after reading https://wiki.php.net/rfc/deprecations_php_8_1#predefined_variable_http_response_header
Commits
-------
b78f1dffc2
[HttpClient] remove using $http_response_header
This commit is contained in:
commit
602b52041a
@ -137,7 +137,7 @@ final class NativeResponse implements ResponseInterface
|
|||||||
|
|
||||||
// Send request and follow redirects when needed
|
// Send request and follow redirects when needed
|
||||||
$this->handle = $h = fopen($url, 'r', false, $this->context);
|
$this->handle = $h = fopen($url, 'r', false, $this->context);
|
||||||
self::addResponseHeaders($http_response_header, $this->info, $this->headers, $this->info['debug']);
|
self::addResponseHeaders(stream_get_meta_data($h)['wrapper_data'], $this->info, $this->headers, $this->info['debug']);
|
||||||
$url = ($this->resolveRedirect)($this->multi, $this->headers['location'][0] ?? null, $this->context);
|
$url = ($this->resolveRedirect)($this->multi, $this->headers['location'][0] ?? null, $this->context);
|
||||||
|
|
||||||
if (null === $url) {
|
if (null === $url) {
|
||||||
|
Reference in New Issue
Block a user