Closed Bug 918691 Opened 11 years ago Closed 10 years ago

[XHR2] Should fake status and statusText better when loading data: URLs

Categories

(Core :: DOM: Core & HTML, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 716491

People

(Reporter: hsteen, Unassigned)

References

()

Details

Per spec, for normal GET requests to data: the .status should be 200 and .statusText should be "OK"
Blocks: xhr2pass
No longer depends on: xhr2pass
The tests seem to have some issues, by the way.  Specifically:

1) data-uri-basic.htm expects data: fetches to not have a content-length header, whereas such a header is in fact desirable last I checked.

2) data-uri-basic.htm expects .responseText to return null, but this is not a nullable attribute in the IDL.

3) data-uri-basic.htm expects a POST to a data: URI to fail, but I see nothing in the fetch spec requiring that behavior.

4) data-uri.htm expects various methods to fail for data:, but I see nothing in the fetch spec requiring that behavior.
Flags: needinfo?(hsteen)
In any case, the status and statusText parts of this are fixed by bug 716491.
Ah, I see, the method stuff is in the basic-fetch parts of fetch.  And I seem to recall some disagreement on the spec list about the content-length which never really reached a resolution.  The null thing still seems bogus to me.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
(In reply to Boris Zbarsky [:bz] from comment #3)
> The tests seem to have some issues, by the way.

Good catch. Fixes here:
https://github.com/w3c/web-platform-tests/pull/1239
Flags: needinfo?(hsteen)
(Fixes do not cover points 3 and 4 because the tests were apparently correct per http://fetch.spec.whatwg.org/#basic-fetch . This spec also says that only content-type (and not content-length) should be generated for data: - Boris seems to think this is a bad idea. Anne?
Flags: needinfo?(annevk)
As far as I can tell we did reach a conclusion: http://lists.w3.org/Archives/Public/public-webapps/2013OctDec/0107.html
Flags: needinfo?(annevk)
Hmm.  OK.  We presumably need a Gecko bug on that bit then, yes?
I reversed the relevant test (but this actual failure is hidden by some other failures in builds w/o the bug 716491 fix.)
You need to log in before you can comment on or make changes to this bug.