The current version of the Web Applications spec says so, and presumably this is how WinIE behaves. I
cannot say that I find such behavior reasonable, though.
Firefox returns null, while Safari returns undefined.
Mozilla also documents a null returned value: <http://lxr.mozilla.org/seamonkey/source/extensions/
Just a remark, this is easily fixed by using jsString() instead of jsStringOrUndefined(), I verified
this. However ap reported to me that this spec is not settled...
The draft spec is now at <http://www.w3.org/TR/XMLHttpRequest/>. I don't know if this specific provision is being disputed, but as long as Firefox doesn't comply, we probably needn't, as well.
Both IE7 and O9 pass that test. I'm not really convinced this should be changed in favor of F1.5 and S2.
So given your comments on IRC I suggest you raise this on firstname.lastname@example.org. Including the fact that it's useful sometimes to distinguish between having a header not set at all and having it set to the emtpy string even though that's against the spirit of HTTP (if I understood Maciej correctly).
So, the draft specification was changed, correcting the summary accordingly.
Created attachment 11628 [details]
This patch modifies our copy of Hixie's test, which didn't conform to the updated draft spec.
Comment on attachment 11628 [details]
Committed revision 18078.