From 8f9486b20e600fe781b0a2f13e3f0bbfdf96a397 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 30 Oct 2020 15:30:19 +0100 Subject: [PATCH] redirects are handled in userland now so no need for this hack anymore --- src/Composer/Util/Http/Response.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/Composer/Util/Http/Response.php b/src/Composer/Util/Http/Response.php index 1b4581331..29dd934d5 100644 --- a/src/Composer/Util/Http/Response.php +++ b/src/Composer/Util/Http/Response.php @@ -90,12 +90,6 @@ class Response foreach ($headers as $header) { if (preg_match('{^'.preg_quote($name).':\s*(.+?)\s*$}i', $header, $match)) { $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; } }