Closed
Bug 276705
Opened 20 years ago
Closed 20 years ago
XMLHttpRequest throws exception if header requested with getResponseHeader doesn't exist
Categories
(Core :: XML, defect)
Core
XML
Tracking
()
RESOLVED
FIXED
mozilla1.8beta1
People
(Reporter: ch.ey, Assigned: bzbarsky)
References
()
Details
Attachments
(1 file)
970 bytes,
patch
|
doronr
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
According to nsIXMLHttpRequest.idl and other descriptions, the return value is "A string containing the text of the header specified. NULL if the response has not yet been received or the header does not exist in the response." But in reality (trunk 20041231) Mozilla throws an exception if the header is not available: 0x80040111 NS_ERROR_NOT_AVAILABLE. Is the bug in the code or in the documentation? I'd prefer getting null.
Assignee | ||
Comment 1•20 years ago
|
||
Attachment #172642 -
Flags: superreview?(jst)
Attachment #172642 -
Flags: review?(doronr)
Updated•20 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 2•20 years ago
|
||
Comment on attachment 172642 [details] [diff] [review] Make the code follow the api reporter: did this regress or has it always been like that? r=doron
Attachment #172642 -
Flags: review?(doronr) → review+
Reporter | ||
Comment 3•20 years ago
|
||
(In reply to comment #2) > reporter: did this regress or has it always been like that? I just started using this interface, so I can't tell.
Comment 4•20 years ago
|
||
Comment on attachment 172642 [details] [diff] [review] Make the code follow the api sr=jst
Attachment #172642 -
Flags: superreview?(jst) → superreview+
Assignee | ||
Updated•20 years ago
|
Assignee: xml → bzbarsky
Target Milestone: --- → mozilla1.8beta
Assignee | ||
Comment 5•20 years ago
|
||
Fixed. Note that I changed to SetIsVoid(PR_TRUE), since this is not an nsAString... I don't know how this managed to compile. :(
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Comment 6•19 years ago
|
||
*** Bug 298550 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•