1
0
Fork 0

When network is disabled all uncached requests result in 404

pull/8424/head
Nils Adermann 2019-11-12 22:22:03 +01:00
parent 7ef3a31de7
commit c325112670
1 changed files with 1 additions and 3 deletions

View File

@ -229,9 +229,7 @@ class HttpDownloader
if (isset($job['request']['options']['http']['header']) && false !== stripos(implode('', $job['request']['options']['http']['header']), 'if-modified-since')) { if (isset($job['request']['options']['http']['header']) && false !== stripos(implode('', $job['request']['options']['http']['header']), 'if-modified-since')) {
$resolve(new Response(array('url' => $url), 304, array(), '')); $resolve(new Response(array('url' => $url), 304, array(), ''));
} else { } else {
$e = new TransportException('Network disabled, request canceled: '.$url, 499); $resolve(new Response(array('url' => $url), 404, array(), ''));
$e->setStatusCode(499);
$reject($e);
} }
return; return;
} }