Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-14290

Function set_modified_headers() never sends 304 'Not Modified' header

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.6, 3.2.0-dev
    • Fix Version/s: 3.1.9-RC1
    • Component/s: Viewing posts
    • Labels:
      None
    • Environment:
      PHP 5.6, MySQL 5.6, Firefox 44

      Description

      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:

      Unable to find source-code formatter for language: diff. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      --- 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)
       		{
      
      

        Attachments

          Activity

            People

            • Assignee:
              Marc Marc
              Reporter:
              Nekstati Nekstati [X] (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: