1
0
Fork 0

redirects are handled in userland now so no need for this hack anymore

pull/9385/head
Jordi Boggiano 2020-10-30 15:30:19 +01:00
parent e0e4d60166
commit 8f9486b20e
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 0 additions and 6 deletions

View File

@ -90,12 +90,6 @@ class Response
foreach ($headers as $header) { foreach ($headers as $header) {
if (preg_match('{^'.preg_quote($name).':\s*(.+?)\s*$}i', $header, $match)) { if (preg_match('{^'.preg_quote($name).':\s*(.+?)\s*$}i', $header, $match)) {
$value = $match[1]; $value = $match[1];
} elseif (preg_match('{^HTTP/}i', $header)) {
// TODO ideally redirects would be handled in CurlDownloader/RemoteFilesystem and this becomes unnecessary
//
// In case of redirects, http_response_headers contains the headers of all responses
// so we reset the flag when a new response is being parsed as we are only interested in the last response
$value = null;
} }
} }