hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From McDowell Sean <s_m_mcdow...@yahoo.com.INVALID>
Subject DeflateInputStream does not detect zlib encoded data
Date Mon, 06 Oct 2014 14:36:53 GMT
I tried a very simple request to our server and we get back a zlib compressed response.I traced
the code to DeflateInputStream where it tries to sniff whether the data is zlib or deflate.
It does this by reading the first 6 bytes and trying to decompress the first byte. I found
that the inflater will not decompress the first byte with only 6 bytes of input. The code
then loops and refeeds the same 6 bytes to the inflater which causes an exception.

I took a copy of that code and found that, for the response I received, I had to increase
the amount of data peeked at to 72 bytes before it could successfully read the first character!
Is this a known bug? I am using the IBM 7.0 JRE if that makes a difference.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message