-
-
Notifications
You must be signed in to change notification settings - Fork 51
Closed
Labels
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the bug has not already been reported
Fastify version
4.26.2
Plugin version
7.0.2
Node.js version
18.x
Operating system
Windows
Description
Download a 200kb yaml plain text file with fastify/compress. Certain lines of the yaml contains illegal chars.
As you can see, on the left side (without compress), icons in the small green box are same.
But on the right side, one of the icon becomes 2 strange question marks.
The content encoding is br (I tried with gzip, same error)
Any thoughts, what can be the root cause?
Steps to Reproduce
const fastify = new Fastify({})
fastify.register(fastifyCompress)
fastify.get('/subscription', async (req, reply) => {
const subscription = await handler.downloadClashSubscriptionAsync(config)
// await require('fs').promises
// .writeFile('/out.txt', subscription, 'utf-8') // <--- the file content is okay
return reply.send(subscription) // <--- the file content is corrupt
})Expected Behavior
Dont expect the two question marks appear in the content.

