Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
* make fileuploads through proxy bigger than 65500 bytes possible * remove gzip-encoding for files from cache
f1ori4907697cfaea
diff --git a/source/de/anomic/http/httpdProxyHandler.java b/source/de/anomic/http/httpdProxyHandler.javaindex 8ab31af7f..4ac36e8e8 100644--- a/source/de/anomic/http/httpdProxyHandler.java+++ b/source/de/anomic/http/httpdProxyHandler.java@@ -712,8 +712,8 @@ public final class httpdProxyHandler {// we respond on the request by using the cache, the cache is freshtry {- modifyProxyHeaders(cachedResponseHeader, httpVer);-+ prepareResponseHeader(cachedResponseHeader, httpVer);+// replace date field in old header by actual date, this is according to RFCcachedResponseHeader.put(httpHeader.DATE, serverDate.formatRFC1123(new Date()));@@ -1031,8 +1031,10 @@ public final class httpdProxyHandler {} else {// read content-length bytes into memorybodyData = new byte[contentLength];- int r = body.read(bodyData, 0, contentLength);- if (r < contentLength) throw new IOException("not all read: " + r + " from " + contentLength);+ int bytes_read = 0;+ while(bytes_read < contentLength) {+ bytes_read += body.read(bodyData, bytes_read, contentLength-bytes_read);+ }}body = new ByteArrayInputStream(bodyData);}@@ -1050,7 +1052,7 @@ public final class httpdProxyHandler {final httpChunkedOutputStream chunked = setTransferEncoding(conProp, responseHeader, res.getStatusCode(), countedRespond);- prepareResponseHeader(responseHeader, res.getHttpVer());+ prepareResponseHeader(responseHeader, res.getHttpVer());// sending the respond header back to the clientif (chunked != null) {