Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Incorrectcontent-encoding forgzip when file is already available +compression-static #470

Closed
Labels
bugSomething isn't workingv2v2 release
Milestone
@davinkevin

Description

@davinkevin

Search for duplicate issues

  • I already searched, and this issue is not a duplicate.

Issue scope

Docker / Kubernetes

Describe the bug

If I runSWS 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 agzip inside agzip.

This generates issues with Apple based browsers, because they don't processgzip 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 inSWS:

app-css.zip

If I run theSWS withdocker run -it --rm -p 8080:8080 ui-for-testing, using the following configuration:

[general]host ="::"port =8080log-level ="info"cache-control-headers =truecompression =truecompression-static =truesecurity-headers =truedirectory-listing =falseredirect-trailing-slash =trueignore-hidden-files =true

I get the following result when I run the followingcurl call:

curl'http://localhost:8080/app.min.css' \      -H'Accept: */*' \      -H'Accept-Encoding: gzip' \      -v -o nul&| grep content-encoding< content-encoding: gzip, gzip

If I setcompression-static = false, the result is "normal", but I suspect the compression is done bySWS and doesn't leverage the pre-builtgzip file.

curl 'http://localhost:8080/app.min.css' \      -H 'Accept: */*' \      -H 'Accept-Encoding: gzip' \      -v -o nul &| grep content-encoding< content-encoding: gzip

Expected behavior

I expect the system to leverage the pre-buildgzip and returns acontent-type with onlygzip once.

Complementary information

From the investigation I did, this bug has been introduced after2.31.0.

If I change myDockerfile 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

  • static-web-server: [e.g. v2.32.0+]
  • Rust: [e.g. v1.78.0]
  • OS: Distrolesss
  • Arch: x86_64 (64-bit), ARM (32-bit), ARM64 (64-bit)
  • Docker: 27.1.1
  • Client: All (Safari, Chrome, Arc,curl)

Additional context

This issue has been found while developing on my application,Podcast-Server, and you can find the code used by the UIhere

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingv2v2 release

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp