At 10:27 PM 10/2/2007 +0200, Manlio Perillo wrote: >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', > > 'WWW-AUTHENTICATE'] > > > >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.
On the contrary. The gateway is responsible for sending *all* the header lines to the client. If you're only taking the last one, your gateway is non-compliant. If nginx can't handle multiple headers, the only way you can be WSGI compliant is to do the folding in the gateway, because the application is explicitly allowed to provide multiple header values for a given header name. _______________________________________________ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com