-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
Unsupported compression of streams #309
Comments
Apparently (As a workaround, you can call |
A PR with a fix would be highly welcomed! |
@mcollina Thank you a lot for the workaround ; this is working well 👍 Regarding replacing |
I attempted to solve this in #312 but in the end I think solving this would require a bigger re-architecture to more modern standards as also described by @mcollina here #297 (comment) but there is a test case I added on that branch if anyone else wants to pick this up |
Prerequisites
Fastify version
4.28.1
Plugin version
7.0.3
Node.js version
20.15.1
Operating system
macOS
Operating system version (i.e. 20.04, 11.3, 10)
14.6.1
Description
On an async function, I return a stream for the body.
If the user doesn't request compression, then it works as expected.
But if he asks for compression, then he gets a 500 and the following error:
Minimal reproducible example
Configure a basic project and install required modules:
index.js:
Example of requests:
All requests are working as expected, except the last one.
Here is the output I'm getting:
Link to code that reproduces the bug
No response
Expected Behavior
I expect that in the reproduction example, the
curl -v --compressed http://localhost:3000/broken
command is returning the expected output to the user, and not an error.Maybe it's a missing feature, and implementing chunk-encoding for streams would solve this?
The text was updated successfully, but these errors were encountered: