Re: [whatwg/fetch] Allow range header to be set by APIs (#560)

jakearchibald commented on this pull request.



> +<p>To create a <dfn for=response id=concept-response-sanitized-copy>sanitized copy</dfn> of a
+<a for=/>response</a> <var>response</var>, run these steps:
+
+<ol>
+ <li><p>If <var>response</var> is a <a>network error</a>, then return a copy of <var>response</var>.
+
+ <li><p>Let <var>unfilteredResponse</var> be <var>response</var>'s <a>internal response</a> if
+ <var>response</var> is a <a>filtered response</a>, otherwise <var>response</var>.
+
+ <li><p>Let <var>sanitizedResponse</var> a new <a for=/>response</a> whose
+ <a for=response>status</a> is <var>unfilteredResponse</var>'s <a for=response>status</a>,
+ <a for=response>HTTPS state</a> is <var>unfilteredResponse</var>'s <a for=response>HTTPS state</a>,
+ and <a for=response>CSP list</a> is <var>unfilteredResponse</var>'s <a for=response>CSP list</a>.
+
+ <li><p>If <var>response</var> is a <a>filtered response</a>, set <var>sanitizedResponse</var> to
+ a new identical filtered response whose <a>internal response</a> is <var>sanitizedResponse</var>.

"identical filtered response" feels a little hand-wavey, but it's what "clone" does above.

-- 
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/560#pullrequestreview-121755361

Received on Monday, 21 May 2018 10:48:11 UTC