Merge pull request #3941 from nextcloud/downstream-27254

HTTP 1.1 used when giving 403 and 404 errors while attempting to down…
This commit is contained in:
Morris Jobke 2017-03-20 01:53:05 -06:00 committed by GitHub
commit 85d7e600c1
1 changed files with 2 additions and 2 deletions

View File

@ -264,12 +264,12 @@ class OC_Files {
if (\OC\Files\Filesystem::isReadable($filename)) {
self::sendHeaders($filename, $name, $rangeArray);
} elseif (!\OC\Files\Filesystem::file_exists($filename)) {
header("HTTP/1.0 404 Not Found");
header("HTTP/1.1 404 Not Found");
$tmpl = new OC_Template('', '404', 'guest');
$tmpl->printPage();
exit();
} else {
header("HTTP/1.0 403 Forbidden");
header("HTTP/1.1 403 Forbidden");
die('403 Forbidden');
}
if (isset($params['head']) && $params['head']) {