Investigate the status code for non-HTTP XHR.

RESOLVED FIXED in mozilla35

Status

()

defect
RESOLVED FIXED
7 years ago
4 years ago

People

(Reporter: emk, Assigned: bzbarsky)

Tracking

({dev-doc-complete})

unspecified
mozilla35
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(relnote-firefox 35+, relnote-b2g ?)

Details

Attachments

(2 attachments)

(Reporter)

Description

7 years ago
Currently we returns 0 instead of 200 for successful non-HTTP responses.
(Reporter)

Comment 1

7 years ago
Posted file Test case
blob data
  0    0       Firefox Nightly + bug 702820 patch
  0    0       Opera 11.60
200  Exception Chrome
200  Exception IE 10 PP3
(In reply to Masatoshi Kimura [:emk] from comment #1)
> 200  Exception Chrome
> 200  Exception IE 10 PP3

Cool. There is precedent. Let's do this.
IMO it would be strange to get http codes for non-http XHR, but if IE and webkit does that too,
I'm ok with the change.
annevk pointed to http://dev.w3.org/2006/webapi/FileAPI/#processingModel for blob:, so our current blob: behavior is clearly wrong.
I'll take this
Assignee: nobody → jonas
Duplicate of this bug: 1062368
Duplicate of this bug: 918772

Comment 8

5 years ago
Under http://fetch.spec.whatwg.org/#basic-fetch this is mostly defined. Feedback welcome. And e.g. when not stated otherwise, a response's status is by default 200.
I see.  That helps, yes.
Duplicate of this bug: 918691
Assignee: jonas → bzbarsky
Status: NEW → ASSIGNED
Attachment #8484303 - Flags: review?(bugs) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/4934b1907579
Flags: in-testsuite+
Target Milestone: --- → mozilla35
https://hg.mozilla.org/mozilla-central/rev/4934b1907579
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED

Comment 14

4 years ago
Release Note Request (optional, but appreciated)
[Why is this notable]: possibly breaking code that assumes false behaviour
[Suggested wording]: Non-HTTP(S) XHR now returns correct status code.
[Links (documentation, blog post, etc)]:
relnote-firefox: --- → ?
relnote-b2g: --- → ?
Duplicate of this bug: 1081668

Updated

4 years ago
Flags: needinfo?(bzbarsky)

Updated

4 years ago
Flags: needinfo?(bzbarsky)

Updated

4 years ago
Depends on: 1151728
Release note already updated (by lsblakk, I think) - https://developer.mozilla.org/en-US/Firefox/Releases/35#InterfacesAPIsDOM

Removing dev-doc-needed.
Keywords: dev-doc-needed
You need to log in before you can comment on or make changes to this bug.