Closed Bug 1502599 Opened 6 years ago Closed 6 years ago

XHR should allow just "GET" method for blob URLs

Categories

(Core :: DOM: File, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: baku, Assigned: baku)

Details

(Keywords: dev-doc-complete)

Attachments

(1 file, 2 obsolete files)

We do this for fetch() but we don't for XHR:
https://searchfox.org/mozilla-central/rev/d5fc6f3d4746279a7c6fd4f7a98b1bc5d05d6b01/dom/fetch/FetchDriver.cpp#469-476

https://fetch.spec.whatwg.org

4.2 "blob": "If request’s method is not `GET` or blob is not a Blob object, then return a network error."
Attached patch xhr_blob.patch (obsolete) — Splinter Review
Attachment #9020514 - Flags: review?(bugs)
Comment on attachment 9020514 [details] [diff] [review]
xhr_blob.patch

silly spec.
Attachment #9020514 - Flags: review?(bugs) → review+
Attached patch xhr_blob.patch (obsolete) — Splinter Review
I need an extra review for this little change in XHR for workers.
There is this block of code that doesn't allow the dispatching of readystatechange before loadstart. this is, btw, against spec.
Attachment #9020514 - Attachment is obsolete: true
Attachment #9021069 - Flags: review?(bugs)
Comment on attachment 9021069 [details] [diff] [review]
xhr_blob.patch

I definitely don't want remove the test for bug 1317725. Could you make it use GET or something?
Attachment #9021069 - Flags: review?(bugs) → review-
Attached patch xhr_blob.patchSplinter Review
Attachment #9021069 - Attachment is obsolete: true
Attachment #9021274 - Flags: review?(bugs)
Attachment #9021274 - Flags: review?(bugs) → review+
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/26bc7f3c808d
XHR should allow just "GET" method for blob URLs, r=smaug
https://hg.mozilla.org/mozilla-central/rev/26bc7f3c808d
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
I've documented this:

Added a section about exceptions on the send() page:
https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/send

Added a note to the Fx65 rel notes page:
https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/65#APIs

Let me know if this works for you. Thanks!
Flags: needinfo?(amarchesini)
Perfect! Thanks Chris.
Flags: needinfo?(amarchesini)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: