Re: [whatwg/fetch] Remove location URL as field on responses (#1149)

@annevk commented on this pull request.



> @@ -2006,6 +1996,34 @@ is a <a>filtered response</a> whose
 <p>A <dfn export id=concept-stale-response>stale response</dfn> is a <a for=/>response</a> that is
 not a <a>fresh response</a> or a <a>stale-while-revalidate response</a>.
 
+<hr>
+
+<p>To <dfn export id=concept-response-location-url>extract a location URL</dfn>, given a
+<a for=/>response</a> <var>response</var>:
+
+<ol>
+ <li><p>If <var>response</var>'s <a for=response>status</a> is not a <a>redirect status</a>, then
+ return null.
+
+ <li><p>Let <var>location</var> be the result of <a>extracting header list values</a> given
+ `<code>Location</code>` and <var>response</var>'s <a for=response>header list</a>.
+ <!-- https://github.com/whatwg/fetch/issues/814#issuecomment-431366126 -->
+
+ <li>
+  <p>If <var>location</var> is a <a for=header>value</a>, then set <var>location</var> to the result

Yeah, but I'm not fixing this here.

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

Received on Friday, 29 January 2021 18:38:37 UTC