Author: ab
Date: Wed Mar  9 12:01:03 2011
New Revision: 1079764

URL: http://svn.apache.org/viewvc?rev=1079764&view=rev
Log:
NUTCH-962 max. redirects not handled correctly: fetcher stops at max-1 
redirects.

Modified:
    nutch/trunk/CHANGES.txt
    nutch/trunk/src/java/org/apache/nutch/fetcher/FetcherReducer.java

Modified: nutch/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/nutch/trunk/CHANGES.txt?rev=1079764&r1=1079763&r2=1079764&view=diff
==============================================================================
--- nutch/trunk/CHANGES.txt (original)
+++ nutch/trunk/CHANGES.txt Wed Mar  9 12:01:03 2011
@@ -2,6 +2,8 @@ Nutch Change Log
 
 Release 2.0 - Current Development
 
+* NUTCH-962 max. redirects not handled correctly: fetcher stops at max-1 
redirects (Sebastian Nagel via ab)
+
 * NUTCH-964 Upgraded Xerces to 2.91 (markus)
 
 * NUTCH-824 Crawling - File Error 404 when fetching file with an hexadecimal 
character in the file name (Michela Becchi via jnioche)

Modified: nutch/trunk/src/java/org/apache/nutch/fetcher/FetcherReducer.java
URL: 
http://svn.apache.org/viewvc/nutch/trunk/src/java/org/apache/nutch/fetcher/FetcherReducer.java?rev=1079764&r1=1079763&r2=1079764&view=diff
==============================================================================
--- nutch/trunk/src/java/org/apache/nutch/fetcher/FetcherReducer.java (original)
+++ nutch/trunk/src/java/org/apache/nutch/fetcher/FetcherReducer.java Wed Mar  
9 12:01:03 2011
@@ -514,14 +514,14 @@ extends GoraReducer<IntWritable, FetchEn
                 output(fit, null, status, CrawlStatus.STATUS_RETRY);
               }
 
-              if (redirecting && redirectCount >= maxRedirect) {
+              if (redirecting && redirectCount > maxRedirect) {
                 fetchQueues.finishFetchItem(fit);
                 LOG.info(" - redirect count exceeded " + fit.url);
                 output(fit, null, ProtocolStatusUtils.STATUS_REDIR_EXCEEDED,
                     CrawlStatus.STATUS_GONE);
               }
 
-            } while (redirecting && (redirectCount < maxRedirect));
+            } while (redirecting && (redirectCount <= maxRedirect));
 
           } catch (final Throwable t) {                 // unexpected exception
             // unblock


Reply via email to