-
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
Express post request with transfer-encoding chuncked has no body #8638
Comments
Thanks for reporting, mind sharing some code to reproduce this issue? |
Hey @Electroid i added a example here to reproduce this: https://github.com/co-sic/bun-playground/tree/cosmo-bun-apollo-server |
Hi! I've potentially run into a similar issue. I use Docker to build a Next.js ( The third party service responds with chunk-encoded data. When deployed (on Railway, via Docker) large (e.g., ~400 rows) responses fail on json parse ( I added a log of the response before json parse, and those (larger) responses that fail log a size of 0kb, while responses that are (ultimately) parsed ok have a non-zero size. Source code from the jshttp lib seems to make its way into the error logs (if left uncaught). I'm wondering whether this has anything to do with:
Here's a permalink to the failing point in my repo. I'm currently working on a more contained/easily-reproducible example. |
I just discovered that using
|
Hey @Electroid any chance on getting a fix (or even workaround) for this soon? Sorry for the ping, but this is currently blocking and i need to consider to maybe move my bun production service back to node again if it will take a longer time to fix. |
I just check and the issue is still there with bun v1.1.8 |
We've seen this issue as well while building an express backend using bun as the runtime for an existing client (so we can't change the way it's performing its requests). So def. still an issue with Bun v1.1.12 When ran through node it works fine. |
Still an issue in bun 1.1.29 :( I have to use node for now |
Here's a tiny repro repo: https://github.com/vitalyavolyn/bun-chunked-repro |
I believe this PR will fix it - #14384, but it's not going to be easy to merge |
What version of Bun is running?
1.0.25, 1.1.8
What platform is your computer?
Linux 6.5.0-15-generic x86_64 x86_64
What steps can reproduce the bug?
I'm running express and apollo-server (latest versions) and i am having the problem that the body of an incomming post request is empty in certain situations. I narrowed it down to the
"transfer-encoding": "chuncked"
header beeing present and/or the 'content-lenght' header beeing not present. If tried the same failing request and send it through a proxy first (ngrok) and then it worked. You can see the diff of the requests here https://www.diffchecker.com/0AdUpa8R/ (Left side is failing, right side is working).What is the expected behavior?
No response
What do you see instead?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: