Re: header() removes all header of the same name.

From: Date: Thu, 20 Oct 2016 13:59:37 +0000
Subject: Re: header() removes all header of the same name.
References: 1 2 3 4 5 6 7 8 9 10 11 12 13  Groups: php.internals 
Request: Send a blank email to internals+get-96526@lists.php.net to get a copy of this message
On 20.10.2016 at 14:15, Stephen Reay wrote: > As with Niklas, I have no vote, so my *only* option to prevent what I consider to be a bad > decision, is to post to this thread and hope that enough of those who *do* have voting rights, > reject the proposal. > > I understand what you’re proposing. But honestly I don’t even agree with the premise that > there is a *problem* that needs to be fixed. > > Did you know that if you manually set the Content-Length header to less than the actual body > length, many browsers (Safari, Chrome, and FF definitely) will stop reading/processing the response > at the length you specify? > So should we also prevent setting Content-Length via header() ? > > Honestly I don’t understand how this is still a discussion. The developer failed to set the > $replace argument to false. At most I would expect this to result in a documentation note warning > about the use of header(‘Set-Cookie…’). > > I appreciate you trying to make improvements, and I’d *definitely* be in favour of the > function naming cleanup you mentioned earlier, but all of this “protected” headers and extra > function calls, because someone forgot to type “, false” seems ridiculous to me honestly. Full ACK. -- Christoph M. Becker

« previous php.internals (#96526) next »