fetch request body does not support streams
Categories
(Core :: DOM: Networking, task, P2)
Tracking
()
People
(Reporter: mihai, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [necko-triaged])
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Safari/605.1.15
Steps to reproduce:
I've tried to make a http post request with a ReadableStream as body. The reason is that the file I'm uploading is very large soi a ReadableStream seems more appropriate than chunks /multipart and obviously too large to fit into memory.
The remote server is http2.
In Chrome it works but it fails in Firefox
Chrome blogpost acknowledges that Firefox is not supporting it yet
Actual results:
The request failed
Expected results:
Fetch request with ReadableStream body should have succeeded.
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:128.0) Gecko/20100101 Firefox/128.0
Comment 1•7 months ago
|
||
Hi Mihai, thank you for reporting this. It seems likely this is related to bug 1909666, which was fixed in the 128.0.3 release (https://www.mozilla.org/en-US/firefox/128.0.3/releasenotes/)
Can you try updating Firefox to the current release version and test again, and let us know if it works there? Thanks!
Comment 2•6 months ago
|
||
I found this issue after reading https://developer.chrome.com/docs/capabilities/web-apis/fetch-streaming-requests and trying it out in firefox, ReadableStream
s are not accepted as the body of a fetch()
request; the example program on the website above does not work in firefox (in fact it even says "It doesn't look like your browser supports request streams."). Neither in 129.0.2, nor in nightly (2023-08-23).
Clearing NI for re-triage. Can necko reproduce?
Comment 4•3 months ago
|
||
Fetch streaming is in our future roadmap.
Updated•3 months ago
|
Description
•