Re: [whatwg/fetch] HTTPS upgrades proposal (PR #1655)

@meacer commented on this pull request.



> +<ol>
+  <li><p>If the <code>https-upgrade</code> flag is not set, return without modifying request.</li>
+
+  <li><p>Otherwise, this is an upgraded request. Let <var>upgradedResponse</var> be the result of
+  fetching the upgraded request.</li>
+
+  <li>
+    <p>If <var>upgradedResponse</var> is a network error, initiate a fallback http load by doing the
+    following:
+
+    <ul>
+      <li><p>Set <var>request</var>'s URL to the value of <var>request</var>'s
+        <code>https-upgrade-fallback-url</code> flag</li>
+
+      <li><p>Set response to the result of running <a>HTTP-redirect fetch</a> given fetchParams and
+        <var>upgradedResponse</var>.</li>

Service worker bits (step 3.5) and step 5 done now, I also updated the fallback algorithm definition.

The idea here is that in the steps before 6, instead of returning a network error, we return the result of `https_upgrade_fallback(request, network_error)`. With this change, Step 6 becomes the actual "Handle upgrade fallback" step. Thus, we don't need to modify the "return a network error" bits after Step 6.

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

Message ID: <whatwg/fetch/pull/1655/review/1492478093@github.com>

Received on Thursday, 22 June 2023 06:47:44 UTC