Re: [whatwg/fetch] Request body streams should use chunked encoding (#966)

> the attempt to tie using a ReadableStream as a request body with a specific networking model.

As a developer (API caller), when I use a stream, I expect that the data is consumed in an ongoing fashion. That is the reason why I use a stream, in any platform and API. If the data was buffered and processed only at the end of the stream, I would be surprised and consider that a bug.

How to make that possible, is another question.

How does HTTP2 play into this? My suggestion to not send a Content-Length and simply let the data stream stop has the problem that the TCP connection needs to be closed to signal the end, which is not ideal. Does HTTP2 binary framing allow to signal the end of one stream, without closing the connection?

If that's possible, we'd have 3 solutions:
* HTTP2: No chunking, just end stream (but not TCP connection)
* HTTP 1.1 with chunking
* HTTP 1.1 without chunking: Close TCP connection

Personally, I would prefer the latter (hard closing TCP connection) over buffering.

-- 
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/issues/966#issuecomment-644130061

Received on Monday, 15 June 2020 13:19:48 UTC