Re: [whatwg/fetch] Streaming upload (Issue #1438)

@yutakahirano thanks for your concerns and ideas.

Regarding this, I think a practical example might be helpful. So, here is a real example of the full duplex streaming over HTTP/1.1:

https://github.com/socketry/async-http-full-duplex-streaming

The example includes both the client and server in the same process so the log output is interleaved for easy interpretation (i.e. when headers are received, when body is streamed, etc).

Regarding the timing of the response from the server before the body is fully received, I think the conclusion you can draw is that (1) it's perfectly reasonable behaviour and (2) it's up to the server when to send the response, either before or after reading the entire body. At the very least, it's semantically possible to do either option and handle that at the server level.

Hope this helps and feel free to experiment with the implementation to consider different use cases. You can also do HTTP/2 with the same code, instructions on how to do this are included.

If there is something practical I can help with regarding test code or experimentation with order of operations, please don't hesitate to let me know.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/1438#issuecomment-1158465278
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fetch/issues/1438/1158465278@github.com>

Received on Friday, 17 June 2022 03:59:49 UTC