Skip to content
Snippets Groups Projects
Commit ff4f5ee7 authored by Ben Coburn's avatar Ben Coburn
Browse files

fixed bug where '304 Not Modified' worked every other time because cache headers were not sent

darcs-hash:20060315120248-05dcb-5d5d4e06d0074a687185131cda2000b914346e19.gz
parent 38f56bff
No related branches found
No related tags found
No related merge requests found
......@@ -82,11 +82,12 @@
function sendFile($file,$mime){
// send headers
header("Content-Type: $mime");
http_conditionalRequest(filemtime($file));
list($start,$len) = http_rangeRequest(filesize($file));
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Accept-Ranges: bytes');
//send important headers first, script stops here if '304 Not Modified' response
http_conditionalRequest(filemtime($file));
list($start,$len) = http_rangeRequest(filesize($file));
//application mime type is downloadable
if(substr($mime,0,11) == 'application'){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment