On Apr 2, 2009, at 2:33 PM, Tres Seaver wrote:
I don't understand why:  if RFC2047 values are being passed as HTTP
headers, then surely the server has enough information to decode them,
and to ensure that they are re-encoded into the same encoding as all
other WSGI enviornment variables (under Python 2.x).

Just so long as the gateway server has an HTTP header parsing implementation and global knowledge of all HTTP headers, including private ones.

Consider:
FooBar: =?utf-8?q?some-text?=

Should that be decoded with RFC2047 rules? Answer: it depends. Does the grammar for FooBar say that the contents is of type TEXT? Maybe it just *looks* like an encoded-word but is actually just a sequence of tokens and separators which have an entirely different meaning for that header. You simply can't tell without the grammar for the FooBar header.

James
_______________________________________________
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

Reply via email to