mirror of
https://github.com/internetarchive/heritrix3.git
synced 2026-09-24 06:36:12 +00:00
fix stats in unusual case of "failed" fetch with response > 0 (only case where this can happen currently is if basic auth is configured for a url, but fails and url returns "401 Unauthorized")
This commit is contained in:
@@ -74,7 +74,6 @@ public class FetchStats extends CrawledBytesHistotable implements Serializable,
|
||||
}
|
||||
break;
|
||||
case SUCCEEDED:
|
||||
this.accumulate(curi);
|
||||
tally(FETCH_SUCCESSES, 1);
|
||||
tally(FETCH_RESPONSES, 1);
|
||||
tally(TOTAL_BYTES, curi.getContentSize());
|
||||
@@ -100,6 +99,10 @@ public class FetchStats extends CrawledBytesHistotable implements Serializable,
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (curi.getFetchStatus() > 0) {
|
||||
this.accumulate(curi);
|
||||
}
|
||||
}
|
||||
|
||||
public long getFetchSuccesses() {
|
||||
|
||||
Reference in New Issue
Block a user