Skip to content

Commit

Permalink
[web-api] Correct MIME type check.
Browse files Browse the repository at this point in the history
Fixes #1138.
  • Loading branch information
Ms2ger committed Sep 23, 2022
1 parent 82a613d commit b29be5a
Showing 1 changed file with 4 additions and 1 deletion.
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=].
1. Remove all [=HTTP tab or space=] from the start and end of |mimeType|.
1. [=ASCII lowercase=] |mimeType|.
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

0 comments on commit b29be5a

Please sign in to comment.