From a2fd262730a9a8623a0dbe0b0ad72581ff2d8070 Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Tue, 29 May 2018 10:52:31 +0200 Subject: [PATCH] address review comments --- fetch.bs | 45 ++++++++++++++++++++------------------------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/fetch.bs b/fetch.bs index f98ae171c..d8287a00c 100644 --- a/fetch.bs +++ b/fetch.bs @@ -2467,7 +2467,7 @@ response header can be used to require checking a request<

Its value ABNF:

-Cross-Origin-Resource-Policy     = %x73.61.6D.65 / %x73.61.6D.65.2D.73.69.74.65 ; "same" / "same-site"; case-sensitive
+Cross-Origin-Resource-Policy = %x73.61.6D.65 / %x73.61.6D.65.2D.73.69.74.65 ; "same" / "same-site", case-sensitive

To perform a cross-origin resource policy check, given a request and response, run these steps:

@@ -2481,33 +2481,27 @@ Cross-Origin-Resource-Policy = %x73.61.6D.65 / %x73.61.6D.65.2D.73.69.74.65 request's current url's origin, then return allowed. -

A cross-origin response redirecting to a same or same-site resource with the - `Cross-Origin-Resource-Policy` header specified does not affect - anything. - - -

  • Let policy be the combined value with - `Cross-Origin-Resource-Policy` and response's - header list. - -

  • If policy is `same`, then return blocked. +

    A cross-origin response redirecting to a response that is + same origin or same site with the initial request and has a + `Cross-Origin-Resource-Policy` header specified, does not affect + anything. I.e., request's tainted origin flag is not checked.

  • -

    If policy is `same-site` and neither of the following is true +

    Let policy be the combined value with + `Cross-Origin-Resource-Policy` and response's + header list. -

    +
  • If policy is `same`, then return blocked. -

    then return blocked +

  • If request's origin's host is same site + with request's current url's host, then return + allowed. + +

  • If policy is `same-site`, then return blocked.

  • Return allowed. @@ -3809,8 +3803,9 @@ Range Requests. [[HTTP-RANGE]] However, this is not widely supported by b -

  • If the cross-origin resource policy check with request and - response returns blocked, then return a network error. +

  • If the CORS flag is unset and the cross-origin resource policy check with + request and response returns blocked, then return a + network error.

  • If response's status is 401, CORS flag