Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
* maxfilesize -1 for infinite filesize
lotusaa38eb5a2056
diff --git a/source/de/anomic/crawler/HTTPLoader.java b/source/de/anomic/crawler/HTTPLoader.javaindex fdf506e79..cb083537e 100644--- a/source/de/anomic/crawler/HTTPLoader.java+++ b/source/de/anomic/crawler/HTTPLoader.java@@ -174,7 +174,7 @@ public final class HTTPLoader {/*// check if the content length is allowedlong contentLength = res.getResponseHeader().getContentLength();- if (maxFileSize >= 0 && contentLength > maxFileSize) {+ if (maxFileSize > 0 && contentLength > maxFileSize) {sb.crawlQueues.errorURL.newEntry(entry, sb.peers.mySeed().hash, new Date(), 1, "file size limit exceeded");throw new IOException("REJECTED URL " + entry.url() + " because file size '" + contentLength + "' exceeds max filesize limit of " + maxFileSize + " bytes. (HEAD)");}@@ -186,7 +186,7 @@ public final class HTTPLoader {long contentLength = responseBody.length;// check length again in case it was not possible to get the length before loading- if (maxFileSize >= 0 && contentLength > maxFileSize) {+ if (maxFileSize > 0 && contentLength > maxFileSize) {sb.crawlQueues.errorURL.newEntry(entry, sb.peers.mySeed().hash, new Date(), 1, "file size limit exceeded");throw new IOException("REJECTED URL " + entry.url() + " because file size '" + contentLength + "' exceeds max filesize limit of " + maxFileSize + " bytes. (GET)");}diff --git a/source/de/anomic/http/httpClientGetMethod.java b/source/de/anomic/http/httpClientGetMethod.javaindex 56e55c316..55f821a3c 100644--- a/source/de/anomic/http/httpClientGetMethod.java+++ b/source/de/anomic/http/httpClientGetMethod.java@@ -45,7 +45,7 @@ public class httpClientGetMethod extends GetMethod {public httpClientGetMethod(String uri, long maxfilesize) {super(uri);- this.maxfilesize = maxfilesize;+ if (maxfilesize > 0) this.maxfilesize = maxfilesize;}@Override