From f137c8a817a1e91a1c5e07d4864ec5e8cc17a0ac Mon Sep 17 00:00:00 2001
From: Matt Falkenhagen
Create a new environment reservedEnvironment, and set its id to a new unique opaque string, its creation URL to request's - url, and its target - browsing context to browsingContext.
+Let done be false and reservedEnvironment be null.
The created environment's active service worker is set in the - handle fetch algorithm during the fetch if its - creation URL matches a service worker - registration.
- +Repeat the following steps until done is true:
-Set request's reserved - client to reservedEnvironment.
If reservedEnvironment is not null, and response's location URL does not have the + same origin as reservedEnvironment's creation URL, then:
-If the Should navigation request of type from source in target be blocked by Content
- Security Policy? algorithm returns "Blocked
" when executed upon
- request, navigationType, sourceBrowsingContext, and
- browsingContext, then set response to a network error.
-
Run the environment discarding steps for reservedEnvironment. +
Otherwise:
+Set reservedEnvironment to null.
Fetch request.
If reservedEnvironment is null, let reservedEnvironment be a new + environment, and set its id to a new + unique opaque string, its creation URL + to request's url, and its target browsing context to + browsingContext.
Wait for the task on the networking task - source to process response and set response to the - result.
If response is not null, set reservedEnvironment's creation URL to response's location URL.
+ +The created environment's active service worker is set in the + Handle Fetch algorithm during the fetch if + the request URL matches a service worker registration.
+Set request's reserved + client to reservedEnvironment.
If the Should navigation request of type from source in target be blocked by Content
+ Security Policy? algorithm returns "Blocked
" when executed upon
+ request, navigationType, sourceBrowsingContext, and
+ browsingContext, then set response to a network error, and set
+ done to true.
Otherwise:
+If response is null, fetch request.
Otherwise, perform HTTP-redirect fetch using + request and response.
Wait for the task on the networking task + source to process response and set response to the + result.
Navigation handles redirects manually as navigation is the only place in the web
- platform that cares for redirects to mailto:
URLs and
- such.
If response does not have a location URL or the location URL is not a URL whose + scheme is an HTTP(S) scheme, + then set done to true.
Navigation handles redirects manually as navigation is the only place in the web
+ platform that cares for redirects to mailto:
URLs and
+ such.
If response has a location + URL that is failure, then set response to a network error.
Otherwise, if response has a location URL that is a URL whose scheme is "blob
", "
Date: Wed, 8 Aug 2018 16:33:06 +0900
Subject: [PATCH 2/5] Add CSP.
---
source | 37 ++++++++++++++++++++++---------------
1 file changed, 22 insertions(+), 15 deletions(-)
diff --git a/source b/source
index 3e2619de504..daab6f91b06 100644
--- a/source
+++ b/source
@@ -2830,10 +2830,13 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
data-x-href="https://fetch.spec.whatwg.org/#concept-request">request and its associated:
Let newRequest be a clone of + request.
If response is not null, append response's location URL to newRequest's + url list.
If reservedEnvironment is not null, and newRequest's + current url does not have the + same origin as reservedEnvironment's creation URL, then:
Run the environment discarding steps for reservedEnvironment. @@ -82051,17 +82062,13 @@ interface Location { // but see also id to a new - unique opaque string, its creation URL - to request's url, and its target browsing context to - browsingContext.
If response is not null, set reservedEnvironment's creation URL to response's location URL.
+If reservedEnvironment is null, let reservedEnvironment be a new + environment, and set its id to a new + unique opaque string, its creation URL + to newRequest's current url, and + its target browsing context + to browsingContext.
The created environment's active service worker is set in the @@ -82074,7 +82081,7 @@ interface Location { // but see also Blocked" when executed upon - request, navigationType, sourceBrowsingContext, and + newRequest, navigationType, sourceBrowsingContext, and browsingContext, then set response to a network error, and set done to true.
If response does not have a location URL or the location URL is not a URL whose + scheme is an HTTP(S) scheme, + then set done to true.
+ +Navigation handles redirects manually as navigation is the only place in
+ the web platform that cares for redirects to mailto:
+ URLs and such.
Navigation handles redirects manually as navigation is the only place in the web
- platform that cares for redirects to mailto:
URLs and
- such.
If reservedEnvironment is null, let reservedEnvironment be a new - environment, and set its id to a new - unique opaque string, its creation URL - to newRequest's current url, and - its target browsing context - to browsingContext.
+Set reservedEnvironment's creation URL to newRequest's + current url.
The created environment's active service worker is set in the
From 30d51a5e422369188e7784366dad169d4df15b96 Mon Sep 17 00:00:00 2001
From: Matt Falkenhagen Let newRequest be a clone of
request. If response is not null, append response's