1
0
Fork 0

Merge pull request #12248 from glaubinix/redirect-response-output-warnings

Allow redirect responses to output warnings/infos
pull/12247/head
Jordi Boggiano 2025-01-10 08:53:32 +01:00 committed by GitHub
commit c12edf8034
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -426,7 +426,7 @@ class CurlDownloader
}
fclose($job['bodyHandle']);
if ($response->getStatusCode() >= 400 && $response->getHeader('content-type') === 'application/json') {
if ($response->getStatusCode() >= 300 && $response->getHeader('content-type') === 'application/json') {
HttpDownloader::outputWarnings($this->io, $job['origin'], json_decode($response->getBody(), true));
}

View File

@ -304,7 +304,7 @@ class RemoteFilesystem
if (!empty($http_response_header[0])) {
$statusCode = self::findStatusCode($http_response_header);
if ($statusCode >= 400 && Response::findHeaderValue($http_response_header, 'content-type') === 'application/json') {
if ($statusCode >= 300 && Response::findHeaderValue($http_response_header, 'content-type') === 'application/json') {
HttpDownloader::outputWarnings($this->io, $originUrl, json_decode($result, true));
}