Improve expectation for not modified check in theme/vier/style

- Address https://github.com/friendica/friendica/issues/9252#issuecomment-721994406
This commit is contained in:
Hypolite Petovan 2020-11-17 18:01:03 -05:00
parent ccad67c68f
commit 260b9e7bd3

View File

@ -61,7 +61,7 @@ header('Cache-Control: public');
header('ETag: "'.$etag.'"'); header('ETag: "'.$etag.'"');
header('Last-Modified: '.$modified); header('Last-Modified: '.$modified);
if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) || isset($_SERVER['HTTP_IF_NONE_MATCH'])) { if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && isset($_SERVER['HTTP_IF_NONE_MATCH'])) {
$cached_modified = gmdate('r', strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE'])); $cached_modified = gmdate('r', strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']));
$cached_etag = str_replace(['"', "-gzip"], ['', ''], $cached_etag = str_replace(['"', "-gzip"], ['', ''],
stripslashes($_SERVER['HTTP_IF_NONE_MATCH'])); stripslashes($_SERVER['HTTP_IF_NONE_MATCH']));