Re: [whatwg/fetch] Add a limited size buffer for streaming upload in HTTP request. (#1204)

@yoichio commented on this pull request.



> @@ -5061,6 +5061,26 @@ optional boolean <var>forceNewConnection</var> (default false), run these steps:
     <ul>
      <li><p>Follow the relevant requirements from HTTP. [[!HTTP]] [[!HTTP-SEMANTICS]] [[!HTTP-COND]] [[!HTTP-CACHING]] [[!HTTP-AUTH]]
 
+     <li>
+      <p>If <var>request</var>'s <a for=request>body</a> is non-null, and <var>request</var>'s
+      <a for=request>body</a>'s <a for=body>source</a> is null, the user agent may have a buffer of
+      <a>implementation-defined</a> size and store a part of <var>request</var>'s
+      <a for=request>body</a> to the buffer. The buffer is used to resend <var>request</var>'s
+      <a for=request>body</a> to the network. If the user agent sent more than the buffer size and
+      is required to resend, return a <a>network error</a>.

I agree to emphasizing this buffer is not big as much as stream.
However this buffer is only needed if body is stream.
As https://bugs.chromium.org/p/chromium/issues/detail?id=1077174, Chrome adopts 64k bytes.
Does this sound good?

-- 
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/1204#discussion_r612966717

Received on Wednesday, 14 April 2021 06:21:53 UTC