-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Server-side support for chunked requests #24139
Comments
Yes. I'm seeing exact same response, or empty body with fetch upload streaming feature on Chromium. |
I believe the code is in |
Ok so looking at https://en.wikipedia.org/wiki/Chunked_transfer_encoding#Encoded_data I'm pretty sure the So I think on my side, the library I was using to do this is using chunked encoding by default when using their "stream" API(which I plugged into the Since wptserver is based on the Python(2?) stdlib server, I don't think it would support this out of the box. Python 3 also doesn't seem to come with a server supporting this out of the box(although it does come with a client that supports it). |
At this point in time, we do not support chunked encoding. I believe doing so would be a non-trivial amount of work, though we would likely welcome outside contributions towards such a goal (note that a change of that magnitude would likely have to go through the RFC process first, essentially an initial design step). If someone were to look towards implementing this support, it's important to consider what features tests would need out of the server, which can differ from what clients of a 'normal' server need. For example, we aim to enable tests to have the server do non-spec-compliant things, specifically so that tests can verify what browsers do in those error cases. So it could potentially be even trickier than implementing compliant chunked request support! :) |
Note that we only need to do this if we decide that we want H/1 support for request body streams, which isn't a settled discussion. And if we support request body streams, the browser would be responsible for the framing, which means the server can be as strict as can be I think as it only needs to consume conforming data and explicitly reject/fail on non-conforming data. |
fetch/api/basic/request-upload.any.js
introduces streaming request bodies(using aReadableStream
), and it's not clear to me if the server supports these types of requests.Also note that the "Transfer-Encoding: chunked" header will be set for such requests, as per Step 4.2 of https://fetch.spec.whatwg.org/#concept-http-network-fetch.
I was trying this out in Servo, which in theory should pass the test, however I was getting an empty body back in the echo, and noticed the following output:
I am not 100% certain that this is a server-side issue, as it might also still be a problem in Servo's client-side code.
The text was updated successfully, but these errors were encountered: