Closed gaby closed 5 months ago
@erikdubbelboer Not sure if this should be better documented. Closing since it's not an issue.
@erikdubbelboer So fasthttp.FS only supports gzip/brotli, but it requires adding 2 params for it? Shouldn't it all just be "compress=True" and use the Accept-Encoding to decide which one to use?
I'm not sure I understand. Yes it supports those if you enable them. You don't need a query param.
While writing unit-tests for Gofiber, we noticed that when using
fasthttp.FS
if the file is too small and we send a request withAccept-Encoding
togzip
the handler will not set the encoding header.Request example:
Example file:
Returned headers:
When using a bigger file like the index.html here https://github.com/gofiber/fiber/blob/main/.github/testdata/fs/index.html
The following headers are returned:
Is this intended, or should fasthttp always set the Content-Encoding header even if the file is now bigger ?