Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-23693

Http Headers are not set when using FastCGI

    XMLWordPrintable

Details

    Description

      The HTTP Status code is sent like this in many parts of ez:

      header( $_SERVER['SERVER_PROTOCOL'] . ' 304 Not Modified' ); // results in 'HTTP/1.1 304 Not Modified' 

      This does not work for FastCGI (PHP-FPM) since the HTTP status needs to be this instead:

      Status: 304 Not Modified

      Resulting in HTTP 200 Codes instead which results in strange bugs like sending an empty tree menu with a 200 instead of 304, a login page with a 200 instead of 401 and so on.

      Some ways of sending the header working with FastCGI are documented here: http://stackoverflow.com/questions/3258634/php-how-to-send-http-response-code

      What do you think? I see two easy possibilities: add a function to the ezhttptool and include this everywhere or just add the third argument of `header()`.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jakobstoeck jakobstoeck
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: