Closed
Bug 1362318
Opened 7 years ago
Closed 7 years ago
Failure in testing/web-platform/tests/XMLHttpRequest/overridemimetype-blob.html
Categories
(Core :: DOM: Core & HTML, enhancement)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: shawnjohnjr, Assigned: shawnjohnjr)
Details
Attachments
(2 files, 2 obsolete files)
Use text/xml as fallback MIME type assert_equals: expected "text/xml" but got "application/xml" Use text/xml as fallback MIME type, 2 assert_equals: expected "text/xml" but got "application/xml" Bogus MIME type should end up as application/octet-stream assert_equals: expected "application/octet-stream" but got "application/x-unknown-content-type" Bogus MIME type should end up as application/octet-stream, 2 assert_equals: expected "application/octet-stream" but got "text/xml"
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → shuang
Assignee | ||
Comment 1•7 years ago
|
||
Assignee | ||
Comment 2•7 years ago
|
||
Assignee | ||
Comment 3•7 years ago
|
||
I'm not sure about this case "Bogus MIME type should end up as application/octet-stream, 2". Based on the specification, "If mime is a parsable MIME type, then set override MIME type to its MIME type portion.". The xhr specification doesn't mention invalid mime type. So I think "text/xml;charset=†" is a parsable MIME type, but it's not a valid MIME type, because the parameter 'dagger' (†) character is invalid token. https://mimesniff.spec.whatwg.org/#parsable-mime-type A valid MIME type is a string that matches the media-type rule defined in section 3.1.1.1 "Media Type" of RFC 7231. In particular, a valid MIME type may include parameters. [RFC7231] token = 1*tchar tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" / DIGIT / ALPHA ; any VCHAR, except delimiters Maybe I'm wrong. Anne, what do you think?
Assignee | ||
Updated•7 years ago
|
Flags: needinfo?(annevk)
Comment 4•7 years ago
|
||
Since the dagger is outside ASCII it cannot be parsed technically I think.
Flags: needinfo?(annevk)
Assignee | ||
Comment 5•7 years ago
|
||
(In reply to Anne (:annevk) from comment #4) > Since the dagger is outside ASCII it cannot be parsed technically I think. https://mimesniff.spec.whatwg.org/#parsable-mime-type Okay, I wonder why they have to distinguish between a parsable MIME type and a valid MIME type.
Comment 6•7 years ago
|
||
Sometimes there are differences between what the parser can return and what is actually valid to write. <style>body { color:green</style> parses as <style>body { color:green }</style> but only the latter is valid. It might not be worth fixing that particular test for now though since I suspect nobody has done sufficient research yet on how MIME types are actually parsed by various browsers.
Assignee | ||
Updated•7 years ago
|
Attachment #8866157 -
Flags: review?(amarchesini)
Assignee | ||
Updated•7 years ago
|
Attachment #8866169 -
Flags: review?(amarchesini)
Updated•7 years ago
|
Attachment #8866157 -
Flags: review?(amarchesini) → review+
Updated•7 years ago
|
Attachment #8866169 -
Flags: review?(amarchesini) → review+
Assignee | ||
Updated•7 years ago
|
Attachment #8866157 -
Attachment is obsolete: true
Assignee | ||
Updated•7 years ago
|
Attachment #8866169 -
Attachment is obsolete: true
Assignee | ||
Comment 7•7 years ago
|
||
Assignee | ||
Comment 8•7 years ago
|
||
Assignee | ||
Comment 9•7 years ago
|
||
try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=e3be2085b1a8a6d5cf7470c23d74099871273f11
Comment 10•7 years ago
|
||
Pushed by shuang@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/5dbfb3a8d5cc Part1: Use text/xml as fallback response MIME type, r=baku https://hg.mozilla.org/integration/mozilla-inbound/rev/b99e360725c8 Part2: Fallback override MIME type to application/octet-stream, r=baku
Comment 11•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/5dbfb3a8d5cc https://hg.mozilla.org/mozilla-central/rev/b99e360725c8
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
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
•