[Web-SIG] Defining a standard interface for common web tasks

John J Lee jjl at pobox.com
Sat Oct 25 08:16:52 EDT 2003

On Fri, 24 Oct 2003, Greg Stein wrote:

> On Fri, Oct 24, 2003 at 10:54:01AM -0500, Ian Bicking wrote:
> > # res.headers['X-additional-header'] = 'Another header' might be okay
> > # but it makes it difficult to add multiple headers by the same name --
> > but
> > # I don't know if HTTP ever really calls for that anyway.
> HTTP specifically discusses what happens when you see two headers with the
> same name:
>     Some-Header: foo
>     Some-Header: bar
> is equivalent to:
>     Some-Header: foo, bar
> i.e. concatenate with a comma. While it is allowed, there is *generally*
> no reason for the API to enable writing separate headers, nor a reason to
> expose same-named headers as separate (i.e. just concatenate them
> internally).
> Note that I say "generally" because I've seen a client that could not deal
> properly with a long header value. By separating the tokens in the header

Another thing that breaks this is the Cookie header: cookie values may
contain commas (and they do!).  Of course, this may not be relevant here,
since Python programmers aren't going to be so silly as to put commas in
their cookie values :-)


More information about the Web-SIG mailing list