Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:75344 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62984 invoked from network); 8 Jul 2014 19:22:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Jul 2014 19:22:20 -0000 Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.52 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.192.52 mail-qg0-f52.google.com Received: from [209.85.192.52] ([209.85.192.52:43043] helo=mail-qg0-f52.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F4/41-53052-AE44CB35 for ; Tue, 08 Jul 2014 15:22:18 -0400 Received: by mail-qg0-f52.google.com with SMTP id f51so5371212qge.25 for ; Tue, 08 Jul 2014 12:22:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=OgemNtGLr2b/eo7OIl3Hj+b9jbbkORqlJAZwRWitjtQ=; b=l6Nwf8cSU85Tiv+ZltvSudafkdSxhb282hUCmBHAK8Bp66hVoZDwA/3wD3/5Ju4ei9 tyKmIqUQaSS1DpRmfeD1djtNYm5ZtYhJ1PVDdF2R5Mc9GXrD8HjAXYcX5R0jsFW2vDJg P6ajAxDUwCx1GEx3LG9Oe9ZjBAJ7HFnN4Vw/Fnu5NNrqqxiuQlrNuXJnyG57aQtd8rMq tc4yClKt1R/vntwCVLzhe1BWc+OuEiHdMXBizxxxzQd5i/JNtb6eZD0QI5WQespg6EHa 1CKOtSMkyczDXG5tSxpUSsphrxFNCOgxKxG53RHAH3yYfxWmEvtPoO8esaXvKCnAWJKr MvZA== MIME-Version: 1.0 X-Received: by 10.229.117.136 with SMTP id r8mr60135838qcq.17.1404847335259; Tue, 08 Jul 2014 12:22:15 -0700 (PDT) Received: by 10.140.47.175 with HTTP; Tue, 8 Jul 2014 12:22:15 -0700 (PDT) In-Reply-To: <1403709912.12695.5.camel@guybrush> References: <1403709912.12695.5.camel@guybrush> Date: Tue, 8 Jul 2014 21:22:15 +0200 Message-ID: To: =?UTF-8?Q?Johannes_Schl=C3=BCter?= Cc: Dmitry Stogov , PHP Internals , Dmitry Stogov Content-Type: multipart/alternative; boundary=001a1133179c61cfee04fdb382b6 Subject: Re: [PHP-DEV] Re: why do we not set http 500 for errors when the display_error is enabled From: tyra3l@gmail.com (Ferenc Kovacs) --001a1133179c61cfee04fdb382b6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, Jun 25, 2014 at 5:25 PM, Johannes Schl=C3=BCter wrote: > On Wed, 2014-06-25 at 16:32 +0200, Ferenc Kovacs 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). > > > > > I believe this causes some inconsistency, sometimes status code is > changed, sometimes not. Uncertain which is worse - wrong code or harder > to predict behavior. > > you mean it would be inconsistent if we would signal the error with a http 500 when it is technically possible (we haven't sent out the headers) versus when the error happened after the headers were already sent? if we consider this as inconsistency, we are already inconsistent, and I'm not sure what would be the consistent alternative: not sending http 500 at all? but as I mentioned I'm not really interested changing the headers already sent scenario (as there isn't much we could do), but I do think that the current behavior about only setting the response code to 500 if display_errors is disabled is questionable. I would like to know if you think that changing this is out of the question or not, and if we would change it, should it happen a minor or a major version. I also think it would make sense to document the current behavior, I couldn't find anything regarding this in the docs. --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --001a1133179c61cfee04fdb382b6--