Closed
Bug 600111
Opened 14 years ago
Closed 12 years ago
XMLHttpRequest.setRequestHeader() throws NS_ERROR_FAILURE inappropriately
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla17
People
(Reporter: zwol, Assigned: Ms2ger)
References
(Blocks 1 open bug, )
Details
(Keywords: dev-doc-needed)
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
sicking
:
review+
|
Details | Diff | Splinter Review |
The W3C spec for XMLHttpRequest (see URL) says that setRequestHeader() is supposed to distinguish two kinds of errors, and doesn't license it to produce any other kind of exception: # Throws an INVALID_STATE_ERR exception if the state is not OPENED or # if the send() flag is true. # # Throws a SYNTAX_ERR exception if header is not a valid HTTP header # field name or if value is not a valid HTTP header field value. Our implementation uses NS_ERROR_FAILURE for conditions falling under both these heads, and also for some internal, should-never-happen conditions (IsPending() or IsCapabilityEnabled() fails - death to xpcom). And it can throw NS_ERROR_IN_PROGRESS under conditions that are unclear to me but probably shouldn't be visible to JS. Also, HttpBaseChannel::SetRequestHeader can throw NS_ERROR_INVALID_ARG for conditions that I think are supposed to be mapped to SYNTAX_ERR in this case, and NS_ERROR_NOT_AVAILABLE for another probably should-never-happen condition (nsHttp::ResolveAtom fails). And several things can produce NS_ERROR_OUT_OF_MEMORY, but we probably don't need to worry about that.
Updated•14 years ago
|
Component: Networking: HTTP → DOM: Mozilla Extensions
QA Contact: networking.http → general
Reporter | ||
Comment 1•14 years ago
|
||
Hm, if this belongs in DOM:MozillaExtensions then so do a whole bunch of other XMLHttpRequest bugs.
Assignee | ||
Updated•14 years ago
|
OS: Linux → All
Hardware: x86_64 → All
Assignee | ||
Updated•14 years ago
|
Assignee: nobody → Ms2ger
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•13 years ago
|
||
This needs tests. I think I'll submit them to the official test suite first.
Assignee | ||
Updated•13 years ago
|
Whiteboard: [needs tests]
Assignee | ||
Comment 3•12 years ago
|
||
Attachment #516677 -
Attachment is obsolete: true
Attachment #645527 -
Flags: review?(bugs)
Assignee | ||
Updated•12 years ago
|
Whiteboard: [needs tests]
Assignee | ||
Updated•12 years ago
|
Attachment #645527 -
Flags: review?(bugs) → review?(jonas)
Attachment #645527 -
Flags: review?(jonas) → review+
Assignee | ||
Comment 4•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/8426cc6a7875
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Keywords: dev-doc-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
Comment 5•12 years ago
|
||
Backed out with the mass tree revert to get rid of the OS X M5 orange: https://hg.mozilla.org/mozilla-central/rev/c801b99d726f
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 6•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/e5b07db1a574
Flags: in-testsuite+
Comment 7•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/e5b07db1a574
Status: REOPENED → RESOLVED
Closed: 12 years ago → 12 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
Component: DOM: Mozilla Extensions → DOM
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•