question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

httpclient gzip decoding failed

See original GitHub issue

Ktor 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:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
pecanwcommented, Apr 30, 2020

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)

1reaction
e5lcommented, Mar 23, 2020

Fixed in 1.3.2

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found