[
https://issues.apache.org/jira/browse/NUTCH-2072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14647385#comment-14647385
]
ASF GitHub Bot commented on NUTCH-2072:
---------------------------------------
GitHub user tuxnco opened a pull request:
https://github.com/apache/nutch/pull/48
Fix for NUTCH-2072
{{HttpBase}} : mimic the behaviour of {{processGzipEncoded}} in
{{processDeflateEncoded}} regarding the handling of the {{http.content.limit}}
especially when it's negative (unlimited).
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/cogniteev/nutch trunk
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/nutch/pull/48.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #48
----
commit e5a0a0943b91a64ee0cd71314546f0876df7789b
Author: Tanguy Moal <[email protected]>
Date: 2015-07-30T09:08:40Z
HttpBase: fix bug when http.content.limit is set to -1 and remote server
uses deflate encoding
----
> Deflate encoding support is broken when http.content.limit is set to -1
> -----------------------------------------------------------------------
>
> Key: NUTCH-2072
> URL: https://issues.apache.org/jira/browse/NUTCH-2072
> Project: Nutch
> Issue Type: Bug
> Components: plugin, protocol
> Reporter: Tanguy Moal
> Priority: Minor
>
> The method {{DeflateUtils.inflateBestEffort(byte[] in, int sizeLimit)}} is
> not designed to have sizeLimit set to a negative value.
> The fix can be simply to mimic what's done with gzip encoding : if
> {{getMaxContent() < 0}} then use {{Integer.MAX_VALUE}} for the {{sizeLimit}}
> argument.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)