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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 3.1.6, 3.2.0-dev
    • 3.1.9-RC1
    • Viewing posts
    • None
    • 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:

      --- 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

            Marc Marc
            Nekstati Nekstati
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: