-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix overrideMimeType() again #174
Conversation
Need to address the comment in #157 about "get an encoding". |
35177d8
to
4be5ae5
Compare
xhr.bs
Outdated
<p>The <dfn id=override-mime-type>override MIME type</dfn> is initially null and can get a value if | ||
{{overrideMimeType()}} is invoked. <dfn id=final-mime-type>Final MIME type</dfn> is the | ||
<p>The <dfn id=override-mime-type>override MIME type</dfn> is initially null and can get a value | ||
when {{overrideMimeType()}} is invoked. <dfn id=final-mime-type>Final MIME type</dfn> is the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: You used "the" for override MIME type but left it out for "final MIME type" and "final charset". (I prefer including it.)
xhr.bs
Outdated
<p><dfn id=final-charset>Final charset</dfn> is the return value of these steps: | ||
|
||
<ol> | ||
<li><p>Let <var>label<var> be null. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing /
in </var>
xhr.bs
Outdated
<a>override charset</a> to its value. | ||
<li><p>If <a>override MIME type</a> is failure, then set <a>override MIME type</a> to a new | ||
<a>MIME type</a> whose <a for="MIME type">type</a> is "<code>application</code>" and | ||
<a for="MIME type">subtype</a> is "<code>octet-stream</code>". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could probably also use the literal syntax here (even though it doesn't really exist).
<a>MIME type portion</a>. | ||
<!-- XXX Ignore string to byte sequence conversion issues until some point in the future --> | ||
<li><p>Set <a>override MIME type</a> to the result of <a lt="parse a MIME type">parsing</a> | ||
<var>mime</var>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This no longer throws out all the parameters. I think that is observable using e.g. a Blob response's type
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's intentional (and tested).
Reset override MIME type when open() is invoked. Actually make overriding the charset parameter work (setting override MIME type to the "MIME type portion" (now essence) as done previously would always erase it. Tests: web-platform-tests/wpt#8449.
6a88bef
to
80dcbba
Compare
Only Firefox required a new bug, the other browsers hadn't aligned with previous changes yet: |
…) tests, a=testonly Automatic update from web-platform-testsAdd more XMLHttpRequest overrideMimeType() tests For whatwg/xhr#157, whatwg/xhr#174, and whatwg/mimesniff#42. -- wpt-commits: ae41496630ba35cff974877498383f1280ca07c2 wpt-pr: 8449
…) tests, a=testonly Automatic update from web-platform-testsAdd more XMLHttpRequest overrideMimeType() tests For whatwg/xhr#157, whatwg/xhr#174, and whatwg/mimesniff#42. -- wpt-commits: ae41496630ba35cff974877498383f1280ca07c2 wpt-pr: 8449 UltraBlame original commit: a743786f569a9e77f8c86a2882abee702f58f981
…) tests, a=testonly Automatic update from web-platform-testsAdd more XMLHttpRequest overrideMimeType() tests For whatwg/xhr#157, whatwg/xhr#174, and whatwg/mimesniff#42. -- wpt-commits: ae41496630ba35cff974877498383f1280ca07c2 wpt-pr: 8449 UltraBlame original commit: a743786f569a9e77f8c86a2882abee702f58f981
…) tests, a=testonly Automatic update from web-platform-testsAdd more XMLHttpRequest overrideMimeType() tests For whatwg/xhr#157, whatwg/xhr#174, and whatwg/mimesniff#42. -- wpt-commits: ae41496630ba35cff974877498383f1280ca07c2 wpt-pr: 8449 UltraBlame original commit: a743786f569a9e77f8c86a2882abee702f58f981
Reset override MIME type when open() is invoked.
Actually make overriding the charset parameter work (setting override MIME type to the "MIME type portion" (now essence) as done previously would always erase it.
Tests: web-platform-tests/wpt#8449.
Preview | Diff