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

HttpClient fs2 backend: Fail to read empty body when Content-Encoding is set #1065

Closed
ybasket opened this issue Aug 10, 2021 · 0 comments · Fixed by #1113
Closed

HttpClient fs2 backend: Fail to read empty body when Content-Encoding is set #1065

ybasket opened this issue Aug 10, 2021 · 0 comments · Fixed by #1113

Comments

@ybasket
Copy link
Contributor

ybasket commented Aug 10, 2021

The fs2 HttpClient (JDK11+) backend fails if a response has Content-Encoding: gzip set and a status code 204 (No Content) as the fs2 gunzip pipe expects the gzip header bytes even if the stream is entirely empty. A more graceful handling would help consuming an otherwise perfectly fine response.

The RFCs don't seem entirely clear whether this is legal, but it can happen when using http4s (see http4s/http4s#5056) and has been "fixed" in other HTTP clients before (see request/request#2177).

@ghost ghost self-assigned this Sep 20, 2021
@ghost ghost mentioned this issue Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant