Author: pkosiorowski
Date: Sat Sep 30 12:35:36 2006
New Revision: 451648

URL: http://svn.apache.org/viewvc?view=rev&rev=451648
Log:
NUTCH-374: when http.content.limit be set to -1 and Response.CONTENT_ENCODING 
is gzip or x-gzip , it can not fetch any thing.(King Kong)

Modified:
    
lucene/nutch/trunk/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java

Modified: 
lucene/nutch/trunk/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java
URL: 
http://svn.apache.org/viewvc/lucene/nutch/trunk/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java?view=diff&rev=451648&r1=451647&r2=451648
==============================================================================
--- 
lucene/nutch/trunk/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java
 (original)
+++ 
lucene/nutch/trunk/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java
 Sat Sep 30 12:35:36 2006
@@ -464,7 +464,12 @@
 
     if (LOGGER.isTraceEnabled()) { LOGGER.trace("uncompressing...."); }
 
-    byte[] content = GZIPUtils.unzipBestEffort(compressed, getMaxContent());
+    byte[] content;
+    if (getMaxContent() >= 0) {
+        content = GZIPUtils.unzipBestEffort(compressed, getMaxContent());
+    } else {
+        content = GZIPUtils.unzipBestEffort(compressed);
+    } 
 
     if (content == null)
       throw new IOException("unzipBestEffort returned null");


Reply via email to