W3C home > Mailing lists > Public > public-webapi@w3.org > May 2008

Re: removeRequestHeader()

From: Julian Reschke <julian.reschke@gmx.de>
Date: Mon, 26 May 2008 13:13:29 +0200
Message-ID: <483A9B59.1070103@gmx.de>
To: Ian Hickson <ian@hixie.ch>
CC: Anne van Kesteren <annevk@opera.com>, Maciej Stachowiak <mjs@apple.com>, Laurens Holst <lholst@students.cs.uu.nl>, public-webapi@w3.org

Ian Hickson wrote:
> On Mon, 26 May 2008, Anne van Kesteren wrote:
>> On Mon, 26 May 2008 10:00:26 +0200, Maciej Stachowiak <mjs@apple.com> wrote:
>>> I am ok with deferring such a mechanism to XHR2 however. In WebKit we'll
>>> likely implement it equally quickly whether it is in XHR1 or XHR2 since it
>>> seems like useful functionality. But there are complications, namely, how
>>> does it interact with headers that are set automatically by the UA?
>> It's not clear to me at all what problem it solves. The examples given 
>> so far are all UA bugs.
> I do think that setting the header to the empty string (as if "" had been 
> passed instead) is better behaviour, from an author's point of view. If 
> that would resolve this issue then that seems like a good choice.

That is not sufficient for the case where a library wants to set a 
header that may already have been set before.

If it does

   xhr.setRequestHeader("foo", "");
   xhr.setRequestHeader("foo", "bar");

currently would result in

   foo: ,bar

being sent.

BR, Julian

PS: and no, FF3 doesn't do that.
Received on Monday, 26 May 2008 11:14:33 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:27 UTC