W3C home > Mailing lists > Public > www-talk@w3.org > March to April 2010

Re: non ascii character in headers?

From: Reinier Post <rp@win.tue.nl>
Date: Wed, 3 Mar 2010 10:41:35 +0100
To: www-talk@w3.org
Message-ID: <20100303094135.GA13013@win.tue.nl>
On Tue, Mar 02, 2010 at 02:17:13PM +0100, Julian Reschke wrote:
> On 02.03.2010 00:49, Brendan Miller wrote:
>> I'm looking at a possible bug in my companies http handling library.
>> The code seems to assume that there are no bytes with the higher order
>> bit set in the http Location header. I'm thinking this will break if
>> the Location header's URI contains non-ascii characters.
> In which case it wouldn't be a valid URI.
>> Is my thinking correct, or is there some rule that prohibits non-ascii
>> chars in an http header?
> Valid URIs never contain non-ASCII characters.

This is not true, see section 2,1 of the spec:


> That doesn't mean it doesn't happen in the wild, though.

Well, a lot of code that handles URI will assume it's ASCII.

> Best regards, Julian

Reinier Post
Received on Wednesday, 3 March 2010 09:42:09 UTC

This archive was generated by hypermail 2.4.0 : Monday, 20 January 2020 16:08:31 UTC