summaryrefslogtreecommitdiff
path: root/image.php
diff options
context:
space:
mode:
authorMike Frysinger <[email protected]>2013-03-29 17:36:51 -0400
committerMike Frysinger <[email protected]>2013-03-29 17:45:23 -0400
commitdd856b484555d86c2d4a2c30e3fb1d82a50e507d (patch)
tree6e96ba13af03bb3fdffa946f68a03b8df6ee9eef /image.php
parent2472737e2069452b00b3ca67914636ddfab62b96 (diff)
send Last-Modified header with the local image
Diffstat (limited to 'image.php')
-rw-r--r--image.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/image.php b/image.php
index cccda64b7..36da375aa 100644
--- a/image.php
+++ b/image.php
@@ -28,6 +28,8 @@
if (file_exists($filename)) {
header("Content-type: image/png");
+ $stamp = gmdate("D, d M Y H:i:s", filemtime($filename)). " GMT";
+ header("Last-Modified: $stamp", true);
echo file_get_contents($filename);
} else {
header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");