-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Tests involving chunked-encoding client fails #4139
Comments
This is a bug in the client, right? Not in the server? If yes, that's due to lack of fetch() request body streaming support, which will be fixed in #4127 |
Yes Bun/Deno only acts as the client in this test. The server is always the Crc32 example https://github.com/uNetworking/uWebSockets/blob/master/examples/Crc32.cpp |
FYI, tested in v0.8.0 and same issue |
on v0.8.0 the |
Yeah that makes sense. I see that it sets header Content-Length=0 when it should instead set Transfer-Encoding=chunked for the case of chunked |
Yeah basically we are never sending chunks, today we lack streaming in this direction, we are trying to get the body (as a blob returning empty in this case) and send it with Content-Length. Related code bun/src/bun.js/webcore/response.zig Lines 1543 to 1548 in 9c68abd
Server logs (first one is without content-type: text/plain
connection: keep-alive
user-agent: Bun/0.8.0_debug
accept: */*
host: localhost:3000
accept-encoding: gzip, deflate
content-length: 32
--- / ---
content-type: application/octet-stream
connection: keep-alive
user-agent: Bun/0.8.0_debug
accept: */*
host: localhost:3000
accept-encoding: gzip, deflate
content-length: 0 |
Just adding that 1.0 also has the issue. Congratulations to the release, btw 👍 |
This is still failing the same way in 1.0.14 |
What version of Bun is running?
0.7.3
What platform is your computer?
Linux
What steps can reproduce the bug?
The test at https://github.com/uNetworking/uWebSockets/blob/master/tests/smoke.mjs runs against a simple Crc32 computing HTTP server.
It takes data via HTTP POST either in chunked-encoding or fixed length body.
Bun acts as the client (but Deno can run the test as well) and sends data in various chunk sizes and total sizes.
Bun fails due to (if I remember correctly) lacking the proper Transfer-Encoding: chunked header, and never completes the test. Deno completes the test without any issues.
This is a long standing bug, since early 0.4.0 days and had not been fixed.
What is the expected behavior?
The test runs as it would with Deno, here is an example of a completed test: https://github.com/uNetworking/uWebSockets/actions/runs/5757781321/job/15609340345 (see step "Run smoke test")
What do you see instead?
Additional information
No response
The text was updated successfully, but these errors were encountered: