Skip to content

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 force-pushed the gh-934-gzip-response branch from 0a048b1 to d7fe851 Compare December 29, 2020 21:33
@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 force-pushed the gh-934-gzip-response branch from c6cf351 to 5efc1c1 Compare December 31, 2020 19:41
@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
velo pushed a commit that referenced this pull request Oct 7, 2024
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`.

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

In addition, 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.

* Adding Deflate support
* Added Deflate Support and removed implicit response body reading
* Refactored Gzip and Deflate Conditions
* Corrected formatting and line-endings
velo pushed a commit that referenced this pull request Oct 8, 2024
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`.

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

In addition, 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.

* Adding Deflate support
* Added Deflate Support and removed implicit response body reading
* Refactored Gzip and Deflate Conditions
* Corrected formatting and line-endings
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