Details
-
Bug
-
Resolution: Unresolved
-
High
-
None
-
2014.11
-
None
-
Nginx + PHP-FPM
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()`.