[Webkit-unassigned] [Bug 29140] getResponseHeader returns "" instead of null as the spec requires.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 22 10:28:19 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=29140





--- Comment #7 from Carol Szabo <carol.szabo at nokia.com>  2009-09-22 10:28:19 PDT ---
Here is the response from the editor of the XMLHttpRequest Level 2
specification to the question that this bug report is trying to address:

Re: XMLHttpRequest: IE compatibility: null versus empty string for    
requesting missing, unsafe, or malformed header names
To: carol.szabo at nokia.com
Cc: ap at webkit.org
On Mon, Sep 21, 2009 at 6:57 PM,  <carol.szabo at nokia.com> wrote:
> IE 8.0 returns an empty string, except that it throws an exception if the
> header name argument is null.
> The standard that I read specifies null for the cases mentioned in the
> subject. Is this difference intentional?
> I personally prefer to have it the way the standard specifies the handling
> of these cases, as it allows a distinction between a header not being
> present and having an empty value, but I would like to know whether the
> current state of the standard is likely to remain as is, or it is likely to
> change to emulate IE, which while providing less information makes it easier
> for the developers to treat missing and empty headers the same way, which is
> probably ok in most cases.
>
> Any thoughts that you might have on this issue are greatly appreciated.

The standard at one point returned the empty string. We changed it for
exactly the reason you mention and I do not plan to change that. By
the way, it's better to use annevk at opera.com if you want to reach me
on such matters. annevankesteren+webkit at gmail.com is just for WebKit
Bugzilla.

Cheers,


-- 
Anne van Kesteren
http://annevankesteren.nl/

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list