I added a fix to the comment for HTTPCLIENT-1550 (included below). I didn't
find any option to reopen the issue, hopefully you can incorporate this fix.
try {
inf.setInput(peeked);
final int n = inf.inflate(dummy);
if (n == -1) {
throw new IOException("Unable to read the response");
}
/* No exception occurred, it appears to be a valid stream */
pushback.unread(peeked, 0, headerLength);
sourceStream = new DeflateStream(pushback, new Inflater());
} catch (final DataFormatException e) {
/* Presume that it's an RFC1951 deflate stream rather than RFC1950
zlib stream. */
pushback.unread(peeked, 0, headerLength);
sourceStream = new DeflateStream(pushback, new Inflater(true));
} finally {
inf.end();
}
On Monday, October 6, 2014 11:29 AM, Oleg Kalnichevski <[email protected]>
wrote:
On Mon, 2014-10-06 at 15:11 +0000, McDowell Sean wrote:
> https://issues.apache.org/jira/browse/HTTPCLIENT-1550?jql=project%20%3D%20HTTPCLIENT
> I see a logged issue that sounds like the same problem I am experiencing but
> it was marked as invalid.
> Based on the log it appears to have the same kind of header that my data
> stream has : 0x78 0x9C. This stream does not have the FDICT flag in the
> header so will not exit successfully from the DeflateInputStream sniffer loop.
> The sniffing code should determine that it is a zlib stream if the first 6
> bytes are successfully fed to the Inflater, whether it manages to decompress
> a byte or not.
> Thanks!
If you are willing to put some work into fixing the issue you are
welcome to re-open HTTPCLIENT-1550
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]