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>

Haven't got to the service worker bits yet, but rephrased this as injecting a 307 redirect. 

Since we return a response here, I think the http fetch step that calls this algorithm needs something like this to use the return value:

`Set fallbackResponse to the result of running <a>handle an HTTPS upgrade fallback</a>. If fallbackResponse is not null, set response to fallbackResponse.`

Does that sound right?

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

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

Received on Tuesday, 13 June 2023 01:39:44 UTC