Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebServer serving static files hangs browser when using compression #7914

Closed
wyvx opened this issue Oct 30, 2023 · 0 comments · Fixed by #7977
Closed

WebServer serving static files hangs browser when using compression #7914

wyvx opened this issue Oct 30, 2023 · 0 comments · Fixed by #7977
Assignees
Labels
4.x Version 4.x bug Something isn't working P2 SE webserver
Projects
Milestone

Comments

@wyvx
Copy link

wyvx commented Oct 30, 2023

I have a simple webserver serving static content. If I add compression, Chrome and Safari (browsers I tested with) hang waiting for a response.

Environment Details

  • Helidon Version: 4.0.0
  • Helidon SE or Helidon MP: SE
  • JDK version: 21
  • OS: macOS Ventura 13.6.1
  • Docker version (if applicable): NA

Problem Description

I have a simple webserver serving static content.
If I serve files without compression everything works as expected.
If I include compression as per documentation, by adding gzip, deflate, or both, Chrome and Safari hang waiting for a response.
The problem is easily reproducible and happens every time.
No exceptions are thrown.

Steps to reproduce

This is the webserver:

        WebServer.builder()
                .address(InetAddress.getLoopbackAddress())
                .port(60_000)
                .routing(builder -> builder
                        .register("/", StaticContentService.builder("mypath")
                                .welcomeFileName("index.html")
                                .build()
                        )
                )
                .build();

And these are the Gradle dependencies for Helidon:

    api(platform("io.helidon:helidon-dependencies:4.0.0"))
    api("io.helidon.webserver:helidon-webserver")
    api("io.helidon.webserver:helidon-webserver-http2")
    api("io.helidon.webserver:helidon-webserver-static-content")
    api("io.helidon.webserver:helidon-webserver-cors")
    api("io.helidon.webserver:helidon-webserver-websocket")
    // If the following two lines are commented out, webserver responds normally.
    api("io.helidon.http.encoding:helidon-http-encoding-gzip")
    api("io.helidon.http.encoding:helidon-http-encoding-deflate")

Visit the website with Chrome, url: http://localhost:60000/
Chrome waits for ever.

Commenting both gzip and deflate dependencies, allows the server to reply normally, without compression of course.

@github-actions github-actions bot added this to Triage in Backlog Oct 30, 2023
@m0mus m0mus added bug Something isn't working P2 4.x Version 4.x SE webserver labels Oct 30, 2023
@m0mus m0mus moved this from Triage to Sprint Scope in Backlog Oct 30, 2023
@m0mus m0mus added this to the 4.0.1 milestone Oct 30, 2023
danielkec added a commit to danielkec/helidon that referenced this issue Nov 8, 2023
Backlog automation moved this from Sprint Scope to Closed Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x Version 4.x bug Something isn't working P2 SE webserver
Projects
Backlog
  
Closed
Development

Successfully merging a pull request may close this issue.

3 participants