[Web-SIG] WSGI and long response header values

James Y Knight foom at fuhm.net
Sun Sep 10 01:49:33 CEST 2006


On Sep 9, 2006, at 1:51 AM, Robert Brewer wrote:

> James Y Knight wrote:
> > I don't see what's wrong with encoding with the 75-char
> > word-limit, separating "words" by spaces, *without* newlines.
> > If the server feels like folding a long line into two, it
> > can do so, but it's perfectly within its rights not to,
> > and AFAIK nothing at all requires it to ever fold, given
> > that a folded line is exactly equivalent to a single space.
> > Line folding is one of those things that really has no purpose
> > in HTTP besides to write out the examples in the RFCs.
>
> And I just said:
> > I was hoping that too, but the server is actually *not*
> > within its rights to leave out the newlines, because that
> > restriction is actually part of RFC 2047 (MIME headers),
> > not the HTTP spec.
>
> Bah. Of course, any HTTP server or proxy is free to unfold headers.  
> So maybe the dream of arbitrary header values via MIME-encoding is  
> broken from the get-go.
No, it's just an inconsistency in the RFC. I suggest reading the  
RFC2616 as having precedence over the requirements in RFC2047, and  
thus the line breaks are not required. I seriously doubt if anything  
will malfunction if given such input. Not that I know of any actual  
use cases of non-ASCII character encoding in http headers, anyhow.

James





More information about the Web-SIG mailing list