1
0
Fork 0

Allow redirect responses to output warnings/infos

pull/12248/head
Stephan Vock 2024-12-19 11:17:17 +00:00
parent fb397acaa0
commit f3f676d2a9
No known key found for this signature in database
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));
}