Re: multiline HTTP headers support in header()
| From: | Solar Designer | Date: | Thu, 03 Jul 2014 01:24:02 +0000 |
| Subject: | Re: multiline HTTP headers support in header() | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-75186@lists.php.net to get a copy of this message | ||
On Thu, Jul 03, 2014 at 02:09:05AM +0100, Andrea Faulds wrote:
> On 3 Jul 2014, at 02:05, Stas Malyshev <smalyshev@sugarcrm.com> wrote:
> > So IE violates the RFC by misparsing the multiline headers? I'd say it's
> > an one more reason to never use IE :) RFC 7230 indeed proposes to remove
> > this capability, but it's not accepted yet, as far as I can see. We can
> > probably drop this immediately for 5.6, for previous versions I'm not
> > sure if anybody uses this feature. So if anybody knows any use of it,
> > please tell, otherwise it's probably a good idea to kill it for stable
> > versions too.
>
> As I?ve had to implement HTTP myself for a particular non-PHP application, I?ve read the
> original HTTP/1.1 RFC. As far as I know, multi-line headers are semantically equivalent to
> single-line headers, so couldn?t we just ?flatten? them automatically? It shouldn?t break anything
> unless you?re deliberately misusing header().
I think we could, and your analysis looks correct to me, but I see no
good enough reason to go for the extra complexity. Having a function
defined in a more complicated manner and implemented with more code is
asking for more bugs and mis-interactions.
Alexander