git.shiar.nl
/
minimedit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
4486f69
)
thumb: content-length http header
author
Mischa POSLAWSKY
<perl@shiar.org>
Tue, 29 Dec 2020 00:22:18 +0000
(
01:22
+0100)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Wed, 30 Dec 2020 23:22:16 +0000
(
00:22
+0100)
Match [Apache] server output for cached files.
Still lacks ETag because PHP cannot calculate this (needs μs mtime).
thumb/index.php
patch
|
blob
|
history
diff --git
a/thumb/index.php
b/thumb/index.php
index bd08d8841497d266a1b573d172431f96981e2b0c..ee6544c534ae4578e7abd9132deb432af0b8f1cd 100644
(file)
--- a/
thumb/index.php
+++ b/
thumb/index.php
@@
-32,7
+32,8
@@
catch (Throwable $e) {
}
header('Cache-Control: max-age=2628000');
-header('Content-type: '.mime_content_type($target));
+header('Content-Type: '.mime_content_type($target));
+header('Content-Length: '.filesize($target));
readfile($target);
exit;