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

GH-934: Update Default Client to handle Compression correctly #1349

Merged
merged 5 commits into from Jan 8, 2021

Conversation

kdavisk6
Copy link
Member

@kdavisk6 kdavisk6 commented Dec 29, 2020

Fixes: #934, #1208

This change updates the Input Stream handling when using the Default client implementation to detect when a response is gzipped and wrap it in a GZipInputStream and the same for deflate and InflaterInputStream respectively.

This addresses any issues related to compression when using the default client.

Additional Changes:

Removed the implicit parsing of the body during toString. This was also brought up in #1208 and it came up
during testing of this change. Users should be using our asReader and other methods to access the response body.

@kdavisk6 kdavisk6 changed the title GH-934: Update Default Client to wrap GZIP Responses correctly GH-934: Update Default Client to handle Compression correctly Dec 29, 2020
This change updates the Input Stream handling when using the Default
client implementation to detect when a response is `gzipped` and
wrap it in a `GZipInputStream`.

This addresses any issues related to compression when using the
default client.
Fixes: OpenFeign#1208

Forgot to add Defate support and removed the implicit parsing of the
body during toString.  This was also brought up in OpenFeign#1208 and it came up
during testing of this change.  Users should be using our `asReader`
and other methods to access the response body.
@kdavisk6 kdavisk6 merged commit 6e5f3eb into OpenFeign:master Jan 8, 2021
@kdavisk6 kdavisk6 deleted the gh-934-gzip-response branch August 2, 2022 14:17
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 this pull request may close these issues.

The default client with URLConnection doesn't work with gzipped response
1 participant