Re: [whatwg/fetch] Add "fetch" as a destination for "connect-src" bound features (#442)

annevk commented on this pull request.



> @@ -1084,10 +1085,10 @@ Unless stated otherwise, it is "<code>basic</code>".
 <hr>
 
 <p>A <dfn export>subresource request</dfn> is a <a for=/>request</a>
-whose <a for=request>destination</a> is "<code>font</code>",
-"<code>image</code>", "<code>manifest</code>", "<code>media</code>",
-"<code>script</code>", "<code>style</code>", "<code>xslt</code>", or the empty
-string.
+whose <a for=request>destination</a> is "<code>fetch</code>",
+"<code>font</code>", "<code>image</code>", "<code>manifest</code>",
+"<code>media</code>", "<code>script</code>", "<code>style</code>",
+"<code>xslt</code>", or the empty string.

This is wrong. It should be normalized at this point, no?

I guess we should fix it differently although I'm not entirely sure how. Ideally whenever a request is created the destination is already correct.

Perhaps we should define a normalize operation for destinations. It takes a potentialDestination. If it is "fetch", we return the empty string. If it is any other value, it returns input. And then standards that want to accept "fetch" as value use that operation.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/442#pullrequestreview-17477194

Received on Thursday, 19 January 2017 15:18:04 UTC