aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorM. Dent <dentm42@gmail.com>2019-11-06 04:10:16 +0100
committerM. Dent <dentm42@gmail.com>2019-11-06 04:10:16 +0100
commit86f7d084834dc006411d788c5f161376b4209df7 (patch)
tree6af9eb8c82e6ac9163736aebd8487c038535b46c
parentaa137fb2d2ddd71f89eea4618cac1594d020ed3a (diff)
parent09ad48c12bf9eba0bf44229bb8028029102ecfa5 (diff)
downloadvolse-hubzilla-86f7d084834dc006411d788c5f161376b4209df7.tar.gz
volse-hubzilla-86f7d084834dc006411d788c5f161376b4209df7.tar.bz2
volse-hubzilla-86f7d084834dc006411d788c5f161376b4209df7.zip
Merge branch 'dev' into 'dev'
Prefer use Etag on photo modification validation See merge request hubzilla/core!1769
-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');