Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
reverting svn 3691+3692
orbiter2fa8b50e5405
diff --git a/source/de/anomic/http/httpHeader.java b/source/de/anomic/http/httpHeader.javaindex 235ac609f..06f011e9c 100644--- a/source/de/anomic/http/httpHeader.java+++ b/source/de/anomic/http/httpHeader.java@@ -705,7 +705,6 @@ public final class httpHeader extends TreeMap implements Map {httpHeader header = new httpHeader(httpd.reverseMappingCache);int p;String line;- long start = System.currentTimeMillis();while ((line = theSession.readLineAsString()) != null) {if (line.length() == 0) break; // this seperates the header of the HTTP request from the body// parse the header line: a property seperated with the ':' sign@@ -713,7 +712,6 @@ public final class httpHeader extends TreeMap implements Map {// store a propertyheader.add(line.substring(0, p).trim(), line.substring(p + 1).trim());}- if (System.currentTimeMillis() - start > theSession.socketTimeout) break;}/*diff --git a/source/de/anomic/http/httpc.java b/source/de/anomic/http/httpc.javaindex 69ed0b944..f509e557d 100644--- a/source/de/anomic/http/httpc.java+++ b/source/de/anomic/http/httpc.java@@ -111,7 +111,6 @@ public final class httpc {private static final String vDATE = "20040602";public static String userAgent;private static final int terminalMaxLength = 30000;- private static final long terminalMaxTime = 60000;private static final TimeZone GMTTimeZone = TimeZone.getTimeZone("GMT");/*** This string is initialized on loading of this class and contains@@ -1709,7 +1708,7 @@ do upload}// reads in the http header, right now, right here- byte[] b = serverCore.receive(httpc.this.clientInput, httpc.this.readLineBuffer, terminalMaxLength, terminalMaxTime, false);+ byte[] b = serverCore.receive(httpc.this.clientInput, httpc.this.readLineBuffer, terminalMaxLength, false);if (b == null) {// the server has meanwhile disconnectedthis.statusCode = 503;@@ -1728,7 +1727,7 @@ do uploadif ((this.statusCode==500)&&(this.statusText.equals("status line parse error"))) {// flush in anything that comes without parsing- while ((b != null) && (b.length != 0)) b = serverCore.receive(httpc.this.clientInput, httpc.this.readLineBuffer, terminalMaxLength, terminalMaxTime, false);+ while ((b != null) && (b.length != 0)) b = serverCore.receive(httpc.this.clientInput, httpc.this.readLineBuffer, terminalMaxLength, false);return; // in bad mood}@@ -1736,13 +1735,13 @@ do uploadif (this.statusCode == 400) {// bad request// flush in anything that comes without parsing- while ((b = serverCore.receive(httpc.this.clientInput, httpc.this.readLineBuffer, terminalMaxLength, terminalMaxTime, false)).length != 0) {}+ while ((b = serverCore.receive(httpc.this.clientInput, httpc.this.readLineBuffer, terminalMaxLength, false)).length != 0) {}return; // in bad mood}// at this point we should have a valid response. read in the header propertiesString key = "";- while ((b = serverCore.receive(httpc.this.clientInput, httpc.this.readLineBuffer, terminalMaxLength, terminalMaxTime, false)) != null) {+ while ((b = serverCore.receive(httpc.this.clientInput, httpc.this.readLineBuffer, terminalMaxLength, false)) != null) {if (b.length == 0) break;buffer = new String(b);buffer=buffer.trim();diff --git a/source/de/anomic/icap/icapHeader.java b/source/de/anomic/icap/icapHeader.javaindex 3274250b3..70e9d091b 100644--- a/source/de/anomic/icap/icapHeader.java+++ b/source/de/anomic/icap/icapHeader.java@@ -290,7 +290,6 @@ public class icapHeader extends TreeMap implements Map {icapHeader header = new icapHeader();int p;String line;- long start = System.currentTimeMillis();while ((line = theSession.readLineAsString()) != null) {if (line.length() == 0) break; // this seperates the header of the HTTP request from the body// parse the header line: a property seperated with the ':' sign@@ -298,7 +297,6 @@ public class icapHeader extends TreeMap implements Map {// store a propertyheader.add(line.substring(0, p).trim(), line.substring(p + 1).trim());}- if (System.currentTimeMillis() - start > theSession.socketTimeout) break;}return header;diff --git a/source/de/anomic/server/serverCore.java b/source/de/anomic/server/serverCore.javaindex 799abb95b..195ae249f 100644--- a/source/de/anomic/server/serverCore.java+++ b/source/de/anomic/server/serverCore.java@@ -1004,7 +1004,7 @@ public final class serverCore extends serverAbstractThread implements serverThre}public byte[] readLine() {- return receive(this.in, this.readLineBuffer, serverCore.this.commandMaxLength, serverCore.this.timeout, false);+ return receive(this.in, this.readLineBuffer, serverCore.this.commandMaxLength, false);}/**@@ -1155,14 +1155,10 @@ public final class serverCore extends serverAbstractThread implements serverThreString reqCmd;String reqProtocol = "HTTP";Object[] stringParameter = new String[1];- long starttime = System.currentTimeMillis();- while ((this.in != null) &&- ((requestBytes = readLine()) != null) &&- (System.currentTimeMillis() - starttime < serverCore.this.timeout)) {+ while ((this.in != null) && ((requestBytes = readLine()) != null)) {this.setName("Session_" + this.userAddress.getHostAddress() +":" + this.controlSocket.getPort() +- "_#=" + this.commandCounter +- "_T=" + (System.currentTimeMillis() - starttime));+ "#" + this.commandCounter);this.request = new String(requestBytes);//log.logDebug("* session " + handle + " received command '" + request + "'. time = " + (System.currentTimeMillis() - handle));@@ -1308,18 +1304,16 @@ public final class serverCore extends serverAbstractThread implements serverThre}- public static byte[] receive(PushbackInputStream pbis, serverByteBuffer readLineBuffer, int maxSize, long timeout, boolean logerr) {+ public static byte[] receive(PushbackInputStream pbis, serverByteBuffer readLineBuffer, int maxSize, boolean logerr) {// reuse an existing linebufferreadLineBuffer.reset();int bufferSize = 0, b = 0;try {- long start = System.currentTimeMillis();while ((b = pbis.read()) > 31) {readLineBuffer.write(b);if (bufferSize++ > maxSize) break;- if ((System.currentTimeMillis() - start > timeout)) break;}// we have catched a possible line end