-
Notifications
You must be signed in to change notification settings - Fork 541
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
bug: created readable for response without body #3588
Comments
headers: { 'content-length': '0' }
|
Sorry, I don't understand. What is the problem? |
Why create a Readable object for the response if there is none. You can just specify null. |
This is interesting idea. Can you try this with a browser? as well as with the Node.js IncomingMessage instance? I'd love to see how other existing clients behave. May be worth exploring the HTTP spec for content-length: 0 too to see if it specifies that the body should not exist or be empty. |
I noticed that a reader is being created for the response body, which is not there and it is explicitly specified in content-length: 0
I also think that we could reject the allocation, the response chunk parse.body via http, and after receiving the completion of the headers, it will switch to FixedLengthReader()/ChunkedReader(), I think that parsing all chunks leads to a slowdown, since you need to make an allocation for each chunk, specify the size to wasm, and then get a steamed chunk through the callbacks
Do we need extra operations on the chunk, or can we just install the reader (ReadableStream?) from the socket
The text was updated successfully, but these errors were encountered: