Skip to content

Commit

Permalink
try to improve speed of serving unreadable files (#14605)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiehl authored and tsteur committed Jul 5, 2019
1 parent 2050e19 commit 7147fc3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/ProxyHttp.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ public static function serverStaticFile($file, $contentType, $expireFarFutureDay
return;
}

if (!is_readable($file)) {
Common::sendResponseCode(500);
return;
}

$modifiedSince = Http::getModifiedSinceHeader();

$fileModifiedTime = @filemtime($file);
Expand Down

0 comments on commit 7147fc3

Please sign in to comment.