Skip to content
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

[web-api] Correct MIME type check. #1537

Merged
merged 3 commits into from
Feb 17, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion document/web-api/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ url:https://w3c.github.io/webappsec-secure-contexts/#environment-settings-object

<pre class='link-defaults'>
spec:ecma-262; type:exception; for:ECMAScript; text:TypeError
spec:fetch; type:dfn; text:get
spec:webidl; type:dfn; text:resolve
</pre>

Expand Down Expand Up @@ -118,7 +119,9 @@ Note: This algorithm accepts a {{Response}} object, or a
1. Let |returnValue| be [=a new promise=]
1. [=Upon fulfillment=] of |source| with value |unwrappedSource|:
1. Let |response| be |unwrappedSource|'s [=Response/response=].
1. Let |mimeType| be the result of [=extracting a MIME type=] from |response|'s [=response/header list=].
1. Let |mimeType| be the result of [=getting=] `` `Content-Type` `` from |response|'s [=response/header list=].
Ms2ger marked this conversation as resolved.
Show resolved Hide resolved
1. Remove all [=HTTP tab or space=] from the start and end of |mimeType|.
Ms2ger marked this conversation as resolved.
Show resolved Hide resolved
1. [=ASCII lowercase=] |mimeType|.
Ms2ger marked this conversation as resolved.
Show resolved Hide resolved
1. If |mimeType| is not `` `application/wasm` ``, reject |returnValue| with a {{TypeError}} and abort these substeps.

Note: extra parameters are not allowed, including the empty `` `application/wasm;` ``.
Expand Down