Re: why do we not set http 500 for errors when the display_error is enabled
| From: | Ferenc Kovacs | Date: | Wed, 25 Jun 2014 14:32:10 +0000 |
| Subject: | Re: why do we not set http 500 for errors when the display_error is enabled | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-75071@lists.php.net to get a copy of this message | ||
On Wed, Jun 25, 2014 at 3:30 PM, Dmitry Stogov <dmitry@zend.com> wrote:
> We can't set 500 response code if HTTP headers were already sent.
>
we have the !SG(headers_sent) check for that, and I'm not proposing to
remove that(albeit I think that we could handle the special scenario, when
the only output is generated by the error, but that is a separate topic).
>
> We also don't set 500 response code if display_error is "on", because
> browsers won't show the actual page with error message (may be it was just
> IE6 or below and it's not a problem anymore).
>
I see. I assume this is related to http://support.microsoft.com/kb/294807
where by default IE shows pretty but generic message for non-2xx messages
if the response content length is less than or equal to a specific
threshold(512 bytes for 500 errors for example).
I don't think that it was a good idea to patch our error handling for the
sake of an usability feature only present in one browser.
thanks for the explanation!
--
Ferenc Kovács
@Tyr43l - http://tyrael.hu