git.cweiske.de
/
phancap.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add deployment instructions
[phancap.git]
/
www
/
get.php
diff --git
a/www/get.php
b/www/get.php
index 694b843173b88b67357abc4c88b8ac165263201c..d4b70d3b3d593edf096f5e2beacdbdad768cead0 100644
(file)
--- a/
www/get.php
+++ b/
www/get.php
@@
-61,10
+61,14
@@
try {
$img = $rep->getImage($options);
if ($config->redirect) {
header('HTTP/1.0 302 Found');
$img = $rep->getImage($options);
if ($config->redirect) {
header('HTTP/1.0 302 Found');
+ header('phancap-file: ' . $img->name);
header('Expires: ' . date('r', $img->getExpiryDate($options)));
header('Location: ' . $img->getUrl());
} else {
header('Expires: ' . date('r', $img->getExpiryDate($options)));
header('Location: ' . $img->getUrl());
} else {
- header('Content-type: ' . $img->getMimeType());
+ header('HTTP/1.0 200 OK');
+ header('phancap-file: ' . $img->name);
+ header('Content-Type: ' . $img->getMimeType());
+ header('Content-Length: ' . filesize($img->getPath()));
readfile($img->getPath());
}
} catch (\Exception $e) {
readfile($img->getPath());
}
} catch (\Exception $e) {