Re: [whatwg/fetch] Ensure scheme fetch always returns a response with an actual body (PR #1505)

@domenic commented on this pull request.



> @@ -4569,7 +4569,8 @@ steps:
   "<code>blank</code>", then return a new <a for=/>response</a> whose
   <a for=response>status message</a> is `<code>OK</code>`, <a for=response>header list</a> is «
   (`<code>Content-Type</code>`, `<code>text/html;charset=utf-8</code>`) », and
-  <a for=response>body</a> is the empty byte sequence.
+  <a for=response>body</a> is the <a for="body with type">body</a> of the result of
+  <a for=BodyInit>safely extracting</a> the empty byte sequence.

A shortcut for this would be appreciated, for use in HTML as well. Basically body-from-byte-sequence. It looks like you could use it below too.

> @@ -4597,22 +4598,21 @@ steps:
       <p class=note>The `<code>GET</code>` <a for=/>method</a> restriction serves no useful purpose
       other than being interoperable.
 
-     <li><p>Let <var>response</var> be a new <a for=/>response</a> whose
-     <a for=response>status message</a> is `<code>OK</code>`.
+     <li><p>Let <var>bodyWithType</var> be the result of <a for=BodyInit>safely extracting</a>
+     <var>blobURLEntry</var>'s <a for="blob URL entry">object</a>.

Hmm. "extract"'s Blob processing is much vaguer than https://w3c.github.io/FileAPI/#blob-get-stream . What is the plan for when to use one versus the other? Should File API just use "safely extract" and get rid of "extract stream"? Basically, who should own the blob -> stream logic, File API or Fetch?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/1505#pullrequestreview-1150170899

You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fetch/pull/1505/review/1150170899@github.com>

Received on Friday, 21 October 2022 00:47:01 UTC