httpclient gzip decoding failed
See original GitHub issueKtor Version
1.2.1
Ktor Engine Used(client or server and name)
Http Client with Apache engine
JVM Version, Operating System and Relevant Context
JDK 11,MAC OS
Feedback
If ContentEncoding feature turned on
install(ContentEncoding) {
gzip()
identity()
}
and get content from any website which supports compression
An exception thrown:
java.lang.IllegalStateException: Gzip padding invalid.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:14 (7 by maintainers)
Top Results From Across the Web
HTTPClient: response body conversion fails when gzip is ...
Hi,. you need to decode gzip yourself or you can set on WebClientOptions the tryUseCompression flag that will set the Accept-Encoding header and...
Read more >Decompressing GZip Stream from HTTPClient Response
I used code from below link to decompress GZip stream.Then used the decompressed byte array to get the required JSON object.
Read more >Decoding the gziped response in HttpClient - Sunil's Notes
I am using Apache Http Client to get Http response from a a web site and display that response in the portlet. That...
Read more >Encoding / Decoding • Akka HTTP - Documentation
Currently, Akka HTTP supports the compression and decompression of HTTP requests and responses with the gzip or deflate encodings. The core logic for...
Read more >Unexpected character while processing gzip payload
This error is expected for DataWeave as the encoding header makes no difference at that point, it is an HTTP header meant for...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had already found the problem as well - see issue #1780. As a workaround you can set logging to a different level (see a sample code linked to the issue - ktorGzipTest)
Fixed in
1.3.2