Re: [whatwg/fetch] Check Feature Policy before attaching Client Hints (#811)

yoavweiss commented on this pull request.



> @@ -2813,8 +2821,15 @@ the request.
          <dd>a suitable <a href=http://httpwg.org/http-extensions/client-hints.html#width>width value</a>
         </dl>
 
-       <li><p>A user agent should <a for="header list">append</a>
-       <var>hintName</var>/<var>value</var> to <var>request</var>'s <a for=request>header list</a>.
+       <li><p>If the result of running
+       <a href="https://wicg.github.io/feature-policy/#should-request-be-allowed-to-use-feature">Should
+       <var>request</var> be allowed to use <var>feature</var>?</a>,
+       given <var>request</var> and <var>hintName</var>’s
+       <a href="http://httpwg.org/http-extensions/client-hints.html#opt-in-via-feature-policy">associated
+       policy-controlled feature</a>, returns <code>true</code>, the user agent should
+       <a for="header list">append</a> <var>hintName</var>/<var>value</var> to <var>request</var>'s
+       <a for=request>header list</a>.
+       [[!FEATURE-POLICY]] [[!CLIENT-HINTS]]

1) and 2) are implemented (but not yet landed) in https://github.com/whatwg/html/pull/3774 and https://github.com/whatwg/fetch/pull/773


@eeeps & @tarunban - maybe we should merge all the different CH related PRs, to make it easier to discuss them in a holistic manner. Thoughts?

-- 
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/811#discussion_r221506236

Received on Monday, 1 October 2018 06:45:04 UTC