aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Photo.php
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2019-11-04 21:44:42 +0100
committerMax Kostikov <max@kostikov.co>2019-11-04 21:44:42 +0100
commit09ad48c12bf9eba0bf44229bb8028029102ecfa5 (patch)
tree4c2897af36e51c7324c8859b2f00d2ecce573c02 /Zotlabs/Module/Photo.php
parent74ef5f38e9bf4642c6e752ad365ae20ead394e56 (diff)
downloadvolse-hubzilla-09ad48c12bf9eba0bf44229bb8028029102ecfa5.tar.gz
volse-hubzilla-09ad48c12bf9eba0bf44229bb8028029102ecfa5.tar.bz2
volse-hubzilla-09ad48c12bf9eba0bf44229bb8028029102ecfa5.zip
Prefer use Etag on photo modification validation
Diffstat (limited to 'Zotlabs/Module/Photo.php')
-rw-r--r--Zotlabs/Module/Photo.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/Zotlabs/Module/Photo.php b/Zotlabs/Module/Photo.php
index fe8c47544..48e2bf4a5 100644
--- a/Zotlabs/Module/Photo.php
+++ b/Zotlabs/Module/Photo.php
@@ -221,7 +221,7 @@ class Photo extends \Zotlabs\Web\Controller {
header_remove('Pragma');
- if($_SERVER['HTTP_IF_NONE_MATCH'] === $etag || $_SERVER['HTTP_IF_MODIFIED_SINCE'] === gmdate("D, d M Y H:i:s", $modified) . " GMT") {
+ if((isset($_SERVER['HTTP_IF_NONE_MATCH']) && $_SERVER['HTTP_IF_NONE_MATCH'] === $etag) || (!isset($_SERVER['HTTP_IF_NONE_MATCH']) && isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && $_SERVER['HTTP_IF_MODIFIED_SINCE'] === gmdate("D, d M Y H:i:s", $modified) . " GMT")) {
header_remove('Expires');
header_remove('Cache-Control');
header_remove('Set-Cookie');