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

Unable to serve file when Content-Length is specified #6541

Closed
martin-sladecek opened this issue Apr 3, 2023 · 7 comments
Closed

Unable to serve file when Content-Length is specified #6541

martin-sladecek opened this issue Apr 3, 2023 · 7 comments
Assignees
Labels
bug Something isn't working P2
Milestone

Comments

@martin-sladecek
Copy link
Contributor

In some cases, when Content-Length is specified, the server request gets stuck and no response is returned.

Environment Details

  • Helidon Version: 3.2.0
  • Helidon MP
  • JDK version: 17
  • OS: Linux
  • Docker version (if applicable):

Problem Description

Sample:
sample.zip

Using the sample, it is possible to reproduce this in 2 ways:

  1. Run the test
  2. Run the app and call /greet endpoint with curl. The request will be stuck and no response is sent, not even headers.

Alternatively, I've tried netcat to send the request manually. Interestingly, when I add 2 newlines after the GET request line, the server starts to send the data.

Steps to reproduce

See problem description above.

@m0mus m0mus added the triage label Apr 3, 2023
@m0mus m0mus added bug Something isn't working P2 labels Apr 3, 2023
@barchetta
Copy link
Member

barchetta commented Apr 3, 2023

Two observations:

  1. The reproducer seems to work with Helidon 4.0.0-ALPHA5 so maybe that points the finger at Helidon code?
  2. I think there is a typo in the app. io.helidon.common.http.Http.Header should be jakarta.ws.rs.core.HttpHeaders. I don't think it is causing a problem, but it is not correct.

@spericas
Copy link
Member

spericas commented Apr 4, 2023

@martin-sladecek Could you try turning off back pressure in microprofile-config.properties as follows?

server.backpressure-strategy=UNBOUNDED

@martin-sladecek
Copy link
Contributor Author

Hi @spericas, the property seems to work.

@spericas
Copy link
Member

spericas commented Apr 4, 2023

@martin-sladecek Great, it is a workaround. There's a bug in the default backpressure strategy that I'm looking into.

@barchetta barchetta added this to the 3.2.1 milestone Apr 4, 2023
@martin-sladecek
Copy link
Contributor Author

None of the backpressure strategies work, not just the default one.

@spericas
Copy link
Member

spericas commented Apr 5, 2023

The other two would require changes to the code, and some explicit flushing (better suited for SE). AUTO_FLUSH is the default one and should work fine in MP.

@spericas
Copy link
Member

spericas commented Apr 5, 2023

PR #6556

@spericas spericas closed this as completed Apr 5, 2023
@m0mus m0mus removed the triage label Apr 6, 2023
@m0mus m0mus added this to Backlog Aug 12, 2024
@m0mus m0mus moved this to Closed in Backlog Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P2
Projects
Archived in project
Development

No branches or pull requests

4 participants