Open Bug 1469359 Opened 6 years ago Updated 7 months ago

Support ReadableStream as Request.body in fetch API in necko

Categories

(Core :: Networking, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: baku, Unassigned)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [necko-triaged])

Fetch API supports ReadableStreams only in Response.body. In order to support them in Request.body, we need to allow the sending of nsIAsyncInputStream as content body in HTTP/2 without knowing its length.
Note: though comment 0 may imply otherwise, I do not believe this is strictly http/2-specific, as it just reads the body from the transaction through the usual ReadSegments stuff, which at the h2 layer doesn't care about length of the stream. This likely lives in the transaction.
Priority: -- → P3
Whiteboard: [necko-triaged]
Andrew: do you have idea what priority this should be, or know who would? (It sounds from bug 1491740 comment 0 that Chrome has this working already, FWIW). Do we have any sort of existing roadmap or bug priority queue for fetch stuff?
Flags: needinfo?(overholt)
(the other) Jason's trying to ship Readable Streams over in bug 1385890. I don't know about the priority around Request.body (https://fetch.spec.whatwg.org/#body). Anne, do you have an opinion on the priority of Request.body as a ReadableStream?
Flags: needinfo?(overholt) → needinfo?(annevk)
This isn't shipped by anyone yet and there remain some open issues (and I think a general lack of good tests for the corner cases). Response streams are important, but this can wait (though I'd expect sorting out the details and shipping this would buy us some developer goodwill and push everyone else to get to it).
Flags: needinfo?(annevk)
Severity: normal → S3

In order to support them in Request.body, we need to allow the sending of nsIAsyncInputStream as content body in HTTP/2 without knowing its length.

Hi Randell, do you know whether it's a solved problem now, given we have WebTransportSendStream?

Flags: needinfo?(rjesup)

Perhaps. From comment 1 it's not h2-specific. I didn't do anything special that would impact this, but maybe this can build on what was done for WT.

Flags: needinfo?(rjesup)
You need to log in before you can comment on or make changes to this bug.