[Web-SIG] Request for Comments on upcoming WSGI Changes
mnot at mnot.net
Tue Sep 22 03:21:03 CEST 2009
HTTP headers *are* ASCII; RFC2616 defined them to be ISO-8859-1, but
HTTPbis currently takes the stance that they're ASCII, as in practice
Latin-1 isn't used and may introduce interop problems.
> Historically, HTTP has allowed field-content with text in the ISO-
> 8859-1 [ISO-8859-1] character encoding (allowing other character
> through use of [RFC2047] encoding). In practice, most HTTP header
> field-values use only a subset of the US-ASCII charset [USASCII].
> Newly defined header fields SHOULD constrain their field-values to
> US-ASCII characters. Recipients SHOULD treat other (obs-text)
> in field-content as opaque data.
What does it mean to "support non-ASCII headers"? As per above, the
only sane thing to do is treat them as opaque data, because you can't
be certain of their encoding unless you have knowledge of the header.
On 21/09/2009, at 12:50 AM, Armin Ronacher wrote:
> Also (something I haven't yet filed as a bug because I guess there
> be more changes involved) the HTTP server in Python 3.1 does not
> non-ASCII headers.
Mark Nottingham http://www.mnot.net/
More information about the Web-SIG