You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This change updates the Service-Worker-Allowed header handling to use modern
Fetch primitives. Specifically:
1. Replaced 'extracting header list values' with 'header list/get'.
2. Added an explicit 'isomorphic decode' step for the header value.
3. Moved the failure check to follow the URL parsing step.
Fixes#1360
1. [=Extract a MIME type=] from the |response|'s [=response/header list=]. If this MIME type (ignoring parameters) is not a [=JavaScript MIME type=], then:
2816
2816
1. Invoke [=Reject Job Promise=] with |job| and "{{SecurityError}}" {{DOMException}}.
2817
2817
1. Asynchronously complete these steps with a [=network error=].
2818
-
1. Let |serviceWorkerAllowed| be the result of [=extracting header list values=]given \`<code>Service-Worker-Allowed</code>\` and |response|'s [=response/header list=].
2818
+
1. Let |serviceWorkerAllowed| be the result of [=header list/get=] \`<code>Service-Worker-Allowed</code>\` from |response|'s [=response/header list=].
2819
2819
2820
2820
Note: See the definition of the [=Service-Worker-Allowed=] header in Appendix B: Extended HTTP headers.
2821
2821
2822
+
1. If |serviceWorkerAllowed| is not null, then set |serviceWorkerAllowed| to the result of [=isomorphic decode=] |serviceWorkerAllowed|.
2822
2823
1. Set |policyContainer| to the result of <a>creating a policy container from a fetch response</a> given |response|.
2823
-
1. If |serviceWorkerAllowed| is failure, then:
2824
-
1. Asynchronously complete these steps with a <a>network error</a>.
2825
2824
1. Let |scopeURL| be |registration|'s [=service worker registration/scope url=].
0 commit comments