Only set error 500 headers when there is an internal server error (Database failure) #6375
Labels
Bug
For errors / faults / flaws / inconsistencies etc.
Milestone
In https://github.com/piwik/piwik/blob/master/core/testMinimumPhpVersion.php#L93 code 500 is assumed if no other headers are present.
However, when comparing Apache2 + php5 mod vs nginx + php-fpm it turns out that invalid request throws 200 code on apache and 500 on nginx. This causes difficulties while trying to find actual issue on server running nginx with custom 4xx and 5xx pages.
Ugly fix: before throwing exception set code 200 headers ?
However I'm not sure if even this default 500 is required actually.
Any thougts ?
The text was updated successfully, but these errors were encountered: