fastify / fastify/fastify-compress
fix: defaultCompressibleTypes regex issue
- 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
4.28.0
### Plugin version
_No response_
### Node.js version
20.16.0
### Operating system
Windows
### Operating system version (i.e. 20.04, 11.3, 10)
10
### Description
If content-type is "[application/force-download]" defaultCompressibleTypes won't allow it.
Then it will goto
```js
const data = mimedb[type.split(';', 1)[0].trim().toLowerCase()]
if (data === undefined) return false
return data.compressible === true
}
```
In this [].split() will throw error.
### Link to code that reproduces the bug
_No response_
### Expected Behavior
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.