diff options
author | Max Kostikov <max@kostikov.co> | 2019-08-01 21:01:12 +0200 |
---|---|---|
committer | Max Kostikov <max@kostikov.co> | 2019-08-01 21:01:12 +0200 |
commit | 8ee5ced08df0e0a0fac330906c4626e0b0e54892 (patch) | |
tree | a0fc7676eae40ec77228e82ba3ffbae6b3825b1f | |
parent | b3b26498144d07b70866b934bfb50ff739eca3e7 (diff) | |
parent | c96a1632f52651fd4acf1a9beae1613caa3962a7 (diff) | |
download | volse-hubzilla-8ee5ced08df0e0a0fac330906c4626e0b0e54892.tar.gz volse-hubzilla-8ee5ced08df0e0a0fac330906c4626e0b0e54892.tar.bz2 volse-hubzilla-8ee5ced08df0e0a0fac330906c4626e0b0e54892.zip |
Merge branch 'dev' into 'dev'
Minor optimizations on static file serve
See merge request hubzilla/core!1699
-rwxr-xr-x | boot.php | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -919,8 +919,7 @@ class App { $staticfilecwd = getcwd(); $staticfilerealpath = realpath(self::$cmd); if(strpos($staticfilerealpath,$staticfilecwd) !== 0) { - header("HTTP/1.1 404 Not Found", true, 404); - killme(); + http_status_exit(404,'not found'); } $staticfileetag = '"'.md5($staticfilerealpath.filemtime(self::$cmd)).'"'; @@ -930,8 +929,7 @@ class App { // If HTTP_IF_NONE_MATCH is same as the generated ETag => content is the same as browser cache // So send a 304 Not Modified response header and exit if($_SERVER['HTTP_IF_NONE_MATCH'] == $staticfileetag) { - header('HTTP/1.1 304 Not Modified', true, 304); - killme(); + http_status_exit(304,'not modified'); } } header("Content-type: ".$serve_rawfiles[$filext]); |