- From: Abin K Paul <notifications@github.com>
- Date: Mon, 26 Sep 2022 09:15:15 -0700
- To: whatwg/fetch <fetch@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/fetch/pull/1468/review/1120541194@github.com>
@abinpaul1 commented on this pull request. > + <li><p>Let <var>responseStatus</var> be 0 if <var>fetchParams</var>'s + <a for="fetch params">request</a>'s <a for=request>mode</a> is "<code>navigate</code>" and + <var>response</var>'s <a for=response>URL</a>'s <a for=url>origin</a> is not + <a>same origin</a> with <var>request</var>'s <a for=request>origin</a>, and + <var>response</var>'s <a for=response>status</a> otherwise. To take redirects into acount, would introducing a new flag to request be a good idea - `is navigation same origin`. As [HTTP fetch step 6.6](https://fetch.spec.whatwg.org/#ref-for-timing-allow-failed%E2%91%A2) we would check if request’s [mode](https://fetch.spec.whatwg.org/#concept-request-mode) is "navigate" and request’s [current URL](https://fetch.spec.whatwg.org/#concept-request-current-url)’s [origin](https://url.spec.whatwg.org/#concept-url-origin) is [same origin](https://html.spec.whatwg.org/multipage/origin.html#same-origin) with request’s [origin](https://fetch.spec.whatwg.org/#concept-request-origin). If at any time this is not the case we set `is navigation same origin` to false. This flag would then be used instead of the current check. Would this work? -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/fetch/pull/1468#discussion_r980254170 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/fetch/pull/1468/review/1120541194@github.com>
Received on Monday, 26 September 2022 16:15:28 UTC