You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nutch.apache.org by ma...@apache.org on 2015/08/03 01:37:53 UTC
svn commit: r1693843 - in /nutch/trunk: CHANGES.txt
src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java
Author: mattmann
Date: Sun Aug 2 23:37:53 2015
New Revision: 1693843
URL: http://svn.apache.org/r1693843
Log:
Fix for NUTCH-2072: Deflate encoding support is broken when http.content.limit is set to -1 contributed by Tanguy Moal <ta...@cogniteev.com> this closes #48.
Modified:
nutch/trunk/CHANGES.txt
nutch/trunk/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java
Modified: nutch/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/nutch/trunk/CHANGES.txt?rev=1693843&r1=1693842&r2=1693843&view=diff
==============================================================================
--- nutch/trunk/CHANGES.txt (original)
+++ nutch/trunk/CHANGES.txt Sun Aug 2 23:37:53 2015
@@ -2,6 +2,8 @@ Nutch Change Log
Nutch Current Development 1.11-SNAPSHOT
+* NUTCH-2072 Deflate encoding support is broken when http.content.limit is set to -1 (Tanguy Moal via mattmann)
+
* NUTCH-2062 Add Plugin for interacting with Selenium WebDriver (Michael Joyce, mattmann)
* NUTCH-1785 Ability to index raw content (markus, lewismc)
Modified: nutch/trunk/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java
URL: http://svn.apache.org/viewvc/nutch/trunk/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java?rev=1693843&r1=1693842&r2=1693843&view=diff
==============================================================================
--- nutch/trunk/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java (original)
+++ nutch/trunk/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java Sun Aug 2 23:37:53 2015
@@ -495,8 +495,12 @@ public abstract class HttpBase implement
LOGGER.trace("inflating....");
}
- byte[] content = DeflateUtils
- .inflateBestEffort(compressed, getMaxContent());
+ byte[] content;
+ if (getMaxContent() >= 0) {
+ content = DeflateUtils.inflateBestEffort(compressed, getMaxContent());
+ } else {
+ content = DeflateUtils.inflateBestEffort(compressed);
+ }
if (content == null)
throw new IOException("inflateBestEffort returned null");