fastify / fastify/fastify-compress
Random content decoding failure
- Dominant language
- JavaScript
- Stars
- 230
- Forks
- 70
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 2
Description
### Prerequisites
- [x] I have written a descriptive issue title
- [x] I have searched existing issues to ensure the bug has not already been reported
### Fastify version
5.2.1
### Plugin version
8.0.2
### Node.js version
20
### Operating system
Windows
### Operating system version (i.e. 20.04, 11.3, 10)
Server running on Linux, clients connecting from Chrome on Windows 11
### Description
Over the past year I have been seeing a random bug with Fastify compress, where after some amount of requests (entirely random) I eventually get a `(failed)net::ERR_CONTENT_DECODING_FAILED`. I am not able to repeat this consistently, but many of my users receive this issue quite alot, even within 5 minutes of using the software.
Is there any part of Fastify compress that could be causing this bug? It does not happen when I disable compression.
Fastify and fastify-compress are updated to the latest versions. Requests that fail usually appear to be around 50 Bytes according to Chromes network monitor.
### Link to code that reproduces the bug
Not able to consistently reproduce as it is random after some amount of requests.
### Expected Behavior
All requests go through successfully and `(failed)net::ERR_CONTENT_DECODING_FAILED` does not occur.
Contributor guide
Assessment
This issue has not been assessed yet.