contentType parameter of Blob slice should be converted to lower case

RESOLVED FIXED in Firefox 53

Status

()

Core
DOM
RESOLVED FIXED
6 years ago
a year ago

People

(Reporter: sawrubh, Assigned: bz)

Tracking

unspecified
mozilla53
Points:
---

Firefox Tracking Flags

(firefox53 fixed)

Details

(URL)

Attachments

(3 attachments, 3 obsolete attachments)

(Reporter)

Description

6 years ago
Created attachment 650856 [details]
Test Case

All the upper case characters in contentType parameter of slice method on Blob objects should be converted to lower case, according to Section 4.B.b of http://dev.w3.org/2006/webapi/FileAPI/#slide-method-algo .

Expected Result : All upper case characters in contentType parameter should be converted to lower case
Actual Result : Upper case remains unchanged
Created attachment 8813970 [details] [diff] [review]
Lowercase the content type in the Blob and File constructors and Blob.slice
Attachment #8813970 - Flags: review?(amarchesini)
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #8813970 - Flags: review?(amarchesini) → review+
Created attachment 8814008 [details] [diff] [review]
Lowercase the content type in the Blob and File constructors and Blob.slice
Attachment #8814008 - Flags: review?(amarchesini)
Attachment #8813970 - Attachment is obsolete: true
Andrea, sorry for the extra review; the only difference is more fail annotations removed from web platform tests...

But actually, there are more failures.  I guess I get to do more try runs.  ;)
Attachment #8814008 - Flags: review?(amarchesini)
Created attachment 8814014 [details] [diff] [review]
Lowercase the content type in the Blob and File constructors and Blob.slice

Ben, could you review the fetch changes please?  The service-workers/service-worker/invalid-blobtype.https.html web platform test used to pass because we left the null char in the type, so trying to set the header failed.  But with Blob fixed to use an empty type string in this case it started failing (but only in e10s for some reason???), because we were not properly implementing the extract operation from fetch in the Blob case.

I have no idea why that failure was e10s-only and would love to hear if you have some idea why....
Attachment #8814014 - Flags: review?(bkelly)
Attachment #8814008 - Attachment is obsolete: true
Comment on attachment 8814014 [details] [diff] [review]
Lowercase the content type in the Blob and File constructors and Blob.slice

Bah, there are more fetch bits that need adjusting. Let's do this properly....
Attachment #8814014 - Flags: review?(bkelly)
Created attachment 8814267 [details] [diff] [review]
part 1.  Fix fetch code to not set a Content-Type header when it shouldn't
Attachment #8814267 - Flags: review?(bkelly)
Created attachment 8814268 [details] [diff] [review]
part 2.  Lowercase the content type in the Blob and File constructors and Blob.slice
Attachment #8814014 - Attachment is obsolete: true

Updated

a year ago
Attachment #8814267 - Flags: review?(bkelly) → review+

Comment 8

a year ago
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/60d9b4f50544
part 1.  Fix fetch code to not set a Content-Type header when it shouldn't.  r=bkelly
https://hg.mozilla.org/integration/mozilla-inbound/rev/9acaf2d4db15
part 2.  Lowercase the content type in the Blob and File constructors and Blob.slice.  r=baku

Comment 9

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/60d9b4f50544
https://hg.mozilla.org/mozilla-central/rev/9acaf2d4db15
Status: ASSIGNED → RESOLVED
Last Resolved: a year ago
status-firefox53: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in before you can comment on or make changes to this bug.