-
Bug
-
Resolution: Fixed
-
Minor
-
3.1.6, 3.2.0-dev
-
None
-
PHP 5.6, MySQL 5.6, Firefox 44
set_modified_headers() checks for non-existent 'Modified-Since' request header instead of 'If-Modified-Since'.
How to reproduce: open any page containing avatars or attached images. Refresh it several times. Images are always reloaded with 200/201 status while 304 is expected.
Possible fix:
--- includes/functions_download.php
|
+++ includes/functions_download.php
|
@@ -410,11 +410,11 @@
|
function set_modified_headers($stamp, $browser)
|
{
|
global $request;
|
|
// let's see if we have to send the file at all
|
- $last_load = $request->header('Modified-Since') ? strtotime(trim($request->header('Modified-Since'))) : false;
|
+ $last_load = $request->header('If-Modified-Since') ? strtotime(trim($request->header('If-Modified-Since'))) : false;
|
|
if (strpos(strtolower($browser), 'msie 6.0') === false && !phpbb_is_greater_ie_version($browser, 7))
|
{
|
if ($last_load !== false && $last_load >= $stamp)
|
{
|
|