Re: Multiple message-header fields handling
Robert Brewer ha scritto:
> As you note, it's part of the HTTP spec that such headers
> can be combined without changing the semantics. Here's a list of the
> headers that need to be folded:
> comma_separated_headers = ['ACCEPT', 'ACCEPT-CHARSET', 'ACCEPT-ENCODING',
> 'ACCEPT-LANGUAGE', 'ACCEPT-RANGES', 'ALLOW', 'CACHE-CONTROL',
> 'CONNECTION', 'CONTENT-ENCODING', 'CONTENT-LANGUAGE', 'EXPECT',
> 'IF-MATCH', 'IF-NONE-MATCH', 'PRAGMA', 'PROXY-AUTHENTICATE', 'TE',
> 'TRAILER', 'TRANSFER-ENCODING', 'UPGRADE', 'VARY', 'VIA', 'WARNING',
Note that some of these headers are response headers, and it is
responsibility of the WSGI application to properly folding them, and not
of the WSGI gateway.
> The only tricky one is Cookie, because e.g. Konqueror sends them on
> multiple lines, but they're not foldable.
> See http://kristol.org/cookie/errata.html
This is a mess...
Note: in some tests, I have seen Firefox sending a Cookie on multiple lines.
Thanks and regards Manlio Perillo
Web-SIG mailing list
Web SIG: http://www.python.org/sigs/web-sig