mirror of
https://github.com/internetarchive/heritrix3.git
synced 2026-09-26 15:46:31 +00:00
Merge branch 'extra-info-size' into aitfive-203
This commit is contained in:
@@ -83,14 +83,12 @@ extends Formatter implements Preformatter, CoreAttributeConstants {
|
||||
} else if (curi.getContentSize() > 0) {
|
||||
length = Long.toString(curi.getContentSize());
|
||||
}
|
||||
mime = curi.getContentType();
|
||||
} else {
|
||||
if (curi.getContentSize() > 0) {
|
||||
length = Long.toString(curi.getContentSize());
|
||||
}
|
||||
mime = curi.getContentType();
|
||||
}
|
||||
mime = MimetypeUtils.truncate(mime);
|
||||
mime = MimetypeUtils.truncate(curi.getContentType());
|
||||
|
||||
long time = System.currentTimeMillis();
|
||||
|
||||
|
||||
@@ -962,6 +962,10 @@ public class FetchHTTP extends Processor implements Lifecycle {
|
||||
protected void setSizes(CrawlURI curi, Recorder rec) {
|
||||
// set reporting size
|
||||
curi.setContentSize(rec.getRecordedInput().getSize());
|
||||
|
||||
// add contentSize to extraInfo so it's available to log in the crawl log
|
||||
curi.addExtraInfo("contentSize", rec.getRecordedInput().getSize());
|
||||
|
||||
// special handling for 304-not modified
|
||||
if (curi.getFetchStatus() == HttpStatus.SC_NOT_MODIFIED
|
||||
&& curi.getFetchHistory() != null) {
|
||||
|
||||
Reference in New Issue
Block a user