[Web-SIG] Python 3.0 and WSGI 1.0.
tseaver at palladion.com
Thu Apr 2 23:08:54 CEST 2009
-----BEGIN PGP SIGNED MESSAGE-----
James Y Knight wrote:
> 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.
> 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
A couple of things:
- - That header is not even allowed by the HTTP RFC's, AFAIK. "Custom"
headers need the 'X-' prefix.
- - I could imagine a server option which disabled decoding for a specific
subset of custom headers, but can't imagine needing it in any real
- - Leaving the WSGI environment a hodgepodge of differently-encoded
junk makes *every* application have to deal with that stuff.
Tres Seaver +1 540-429-0999 tseaver at palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the Web-SIG