Incorrect content-encoding
for gzip
when file is already available + compression-static
#470
Closed
6 of 7 tasks
Search for duplicate issues
Issue scope
Docker / Kubernetes
Describe the bug
If I run
SWS
with my "frontend" package, with both regular and pre-compressed files (.gzip
), I see an unexpectedcontent-encoding
returned bySWS
:content-encoding: gzip, gzip
.After verification, the content is packaged twice, aka a
gzip
inside agzip
.This generates issues with Apple based browsers, because they don't process
gzip
twice and so can't parsejs
orcss
after the first "unpackaging".How to reproduce it
Find attached files I have generated, with the unexpected result in
SWS
:app-css.zip
If I run the
SWS
withdocker run -it --rm -p 8080:8080 ui-for-testing
, using the following configuration:I get the following result when I run the following
curl
call:If I set
compression-static = false
, the result is "normal", but I suspect the compression is done bySWS
and doesn't leverage the pre-builtgzip
file.Expected behavior
I expect the system to leverage the pre-build
gzip
and returns acontent-type
with onlygzip
once.Complementary information
From the investigation I did, this bug has been introduced after
2.31.0
.If I change my
Dockerfile
to2.32.0
, I have the issue, but I don't have it with2.31.0
, of course with the same config and files.Build target
Docker linux/amd64
Environment and specs
curl
)Additional context
This issue has been found while developing on my application, Podcast-Server, and you can find the code used by the UI here
The text was updated successfully, but these errors were encountered: