Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip unnecessary checks when we have a preloaded response candidate in main fetch #1803

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 17 additions & 9 deletions fetch.bs
Original file line number Diff line number Diff line change
Expand Up @@ -4477,19 +4477,27 @@ steps:

<li><p>Let <var>response</var> be null.

<li><p>If <var>request</var>'s <a>local-URLs-only flag</a> is set and <var>request</var>'s
<a for=request>current URL</a> is not <a lt="is local">local</a>, then set <var>response</var> to a
<a>network error</a>.
<li>
<p>If <var>fetchParams</var>'s <a for="fetch params">preloaded response candidate</a> is null:
nidhijaju marked this conversation as resolved.
Show resolved Hide resolved

<li><p>Run <a>report Content Security Policy violations for <var>request</var></a>.
<ol>
<li><p>If <var>request</var>'s <a>local-URLs-only flag</a> is set and <var>request</var>'s
<a for=request>current URL</a> is not <a lt="is local">local</a>, then set <var>response</var> to a
<a>network error</a>.

<li><p><a>Upgrade <var>request</var> to a potentially trustworthy URL, if appropriate</a>.
<li><p>Run <a>report Content Security Policy violations for <var>request</var></a>.

<li><p><a>Upgrade a mixed content <var>request</var> to a potentially trustworthy URL, if appropriate</a>.
<li><p><a>Upgrade <var>request</var> to a potentially trustworthy URL, if appropriate</a>.

<li><p><a>Upgrade a mixed content <var>request</var> to a potentially trustworthy URL, if appropriate</a>.

<li><p>If <a lt="block bad port">should <var>request</var> be blocked due to a bad port</a> or
<a lt="should request be blocked by Content Security Policy?">should <var>request</var> be blocked by Content Security Policy</a>
returns <b>blocked</b>, then set <var>response</var> to a <a>network error</a>.
</ol>

<li><p>If <a lt="block bad port">should <var>request</var> be blocked due to a bad port</a>,
<a lt="should fetching request be blocked as mixed content?">should fetching <var>request</var> be blocked as mixed content</a>, or
<a lt="should request be blocked by Content Security Policy?">should <var>request</var> be blocked by Content Security Policy</a>
<li><p>If
<a lt="should fetching request be blocked as mixed content?">should fetching <var>request</var> be blocked as mixed content</a>
returns <b>blocked</b>, then set <var>response</var> to a <a>network error</a>.

<li><p>If <var>request</var>'s <a for=request>referrer policy</a> is the empty string, then set
Expand Down