Open Bug 1911164 Opened 7 months ago Updated 8 days ago

fetch request body does not support streams

Categories

(Core :: DOM: Networking, task, P2)

Firefox 116
task

Tracking

()

UNCONFIRMED

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

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!

Component: Untriaged → Networking: HTTP
Flags: needinfo?(mihai)
Product: Firefox → Core

I found this issue after reading https://developer.chrome.com/docs/capabilities/web-apis/fetch-streaming-requests and trying it out in firefox, ReadableStreams 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?

Flags: needinfo?(mihai)

Fetch streaming is in our future roadmap.

Blocks: 1387483
Severity: -- → N/A
Type: defect → task
Component: Networking: HTTP → DOM: Networking
Priority: -- → P2
Whiteboard: [necko-triaged]
You need to log in before you can comment on or make changes to this bug.