Permalink
Browse files

improved directory handling and PDF compatibility SC#5

  • Loading branch information...
1 parent 92a89ca commit 8eca7e454fa1a3400b3030322bb2dfb0ec4d82e1 skodak committed Dec 15, 2004
Showing with 2 additions and 1 deletion.
  1. +2 −1 file.php
View
@@ -51,7 +51,7 @@
$filename = $fileargs[0]; // Only keep what's before the '?'
}
- if (file_exists($pathname)) {
+ if (file_exists($pathname) and !is_dir($pathname)) {
$lastmodified = filemtime($pathname);
$mimetype = mimeinfo("type", $filename);
@@ -60,6 +60,7 @@
header("Cache-control: max_age = $CFG->filelifetime");
header("Pragma: ");
header("Content-disposition: inline; filename=$filename");
+ header('Accept-Ranges: none');
if (empty($CFG->filteruploadedfiles)) {

0 comments on commit 8eca7e4

Please sign in to comment.