Allow redirect responses to output warnings/infos
parent
fb397acaa0
commit
f3f676d2a9
|
@ -426,7 +426,7 @@ class CurlDownloader
|
||||||
}
|
}
|
||||||
fclose($job['bodyHandle']);
|
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));
|
HttpDownloader::outputWarnings($this->io, $job['origin'], json_decode($response->getBody(), true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -304,7 +304,7 @@ class RemoteFilesystem
|
||||||
|
|
||||||
if (!empty($http_response_header[0])) {
|
if (!empty($http_response_header[0])) {
|
||||||
$statusCode = self::findStatusCode($http_response_header);
|
$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));
|
HttpDownloader::outputWarnings($this->io, $originUrl, json_decode($result, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue