Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
undo 5044
danielr7e7e6a099adc
diff --git a/source/de/anomic/http/httpd.java b/source/de/anomic/http/httpd.javaindex c5208986a..176144c0c 100644--- a/source/de/anomic/http/httpd.java+++ b/source/de/anomic/http/httpd.java@@ -38,6 +38,7 @@ import java.net.InetAddress;import java.net.MalformedURLException;import java.net.URLDecoder;import java.net.URLEncoder;+import java.nio.charset.Charset;import java.util.Arrays;import java.util.Date;import java.util.HashMap;@@ -884,17 +885,14 @@ public final class httpd implements serverHandler, Cloneable {@SuppressWarnings("unchecked")public static HashMap<String, byte[]> parseMultipart(final httpHeader header, final serverObjects args, final InputStream in, final int length)throws IOException {- // read all data from network in memory- byte[] buffer = serverFileUtils.read(in);- // parse data in memory- RequestContext request = new yacyContextRequest(header, new ByteArrayInputStream(buffer));+ RequestContext request = new yacyContextRequest(header, in);// check informationif (!FileUploadBase.isMultipartContent(request)) {throw new IOException("the request is not a multipart-message!");}- // format information for further usage+ // parse data in memoryFileItemFactory factory = new DiskFileItemFactory();FileUpload upload = new FileUpload(factory);List<FileItem> items;@@ -904,6 +902,7 @@ public final class httpd implements serverHandler, Cloneable {throw new IOException("FileUploadException " + e.getMessage());}+ // format information for further usagefinal HashMap<String, byte[]> files = new HashMap<String, byte[]>();int formFieldCount = 0;for (FileItem item : items) {