[Web-SIG] Python 3.0 and WSGI 1.0.
James Y Knight
foom at fuhm.net
Thu Apr 2 21:56:44 CEST 2009
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
More information about the Web-SIG
mailing list