Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
* fix filesize in ftp crawls
f1oriee3cef91e80d
diff --git a/source/de/anomic/crawler/retrieval/FTPLoader.java b/source/de/anomic/crawler/retrieval/FTPLoader.javaindex cff12bd18..740172f30 100644--- a/source/de/anomic/crawler/retrieval/FTPLoader.java+++ b/source/de/anomic/crawler/retrieval/FTPLoader.java@@ -231,6 +231,7 @@ public class FTPLoader {// if the mimetype and file extension is supported we start to download the filefinal long size = ftpClient.fileSize(path);+ responseHeader.put(HeaderFramework.CONTENT_LENGTH, String.valueOf(size));String parserError = null;if ((acceptOnlyParseable && (parserError = TextParser.supports(url, mime)) != null) ||(size > maxFileSize && maxFileSize >= 0)) {@@ -252,7 +253,7 @@ public class FTPLoader {responseHeader,"200",mp == null ? null : new CrawlProfile(mp),- url.toTokens().getBytes());+ null);return response;}diff --git a/source/de/anomic/crawler/retrieval/Response.java b/source/de/anomic/crawler/retrieval/Response.javaindex 0fec79f27..bb21ba980 100755--- a/source/de/anomic/crawler/retrieval/Response.java+++ b/source/de/anomic/crawler/retrieval/Response.java@@ -241,11 +241,11 @@ public class Response {}public long size() {- if (this.content != null) return this.content.length;if (this.responseHeader != null) {// take the size from the response headerreturn this.responseHeader.getContentLength();}+ if (this.content != null) return this.content.length;// the size is unknownreturn -1;}