From 06408a9428ab9f643aa9cd5eea41b956faec6410 Mon Sep 17 00:00:00 2001 From: sixcooler Date: Sat, 13 Aug 2011 01:04:37 +0000 Subject: [PATCH] since many POST-requests come as gzip they report a contentlength of -1 request memory of -1 * 3 look useless to me so I added some megs to it - even correct report of contentlength should not be harmed by this git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7880 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/http/server/HTTPDemon.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/de/anomic/http/server/HTTPDemon.java b/source/de/anomic/http/server/HTTPDemon.java index 764c11088..2bf70d509 100644 --- a/source/de/anomic/http/server/HTTPDemon.java +++ b/source/de/anomic/http/server/HTTPDemon.java @@ -816,15 +816,15 @@ public final class HTTPDemon implements serverHandler, Cloneable { } // check if we have enough memory - if (!MemoryControl.request(request.getContentLength() * 3, false)) { + if (!MemoryControl.request(request.getContentLength() * 3 + 10*1024*1024, false)) { throw new IOException("not enough memory available for request. request.getContentLength() = " + request.getContentLength() + ", MemoryControl.available() = " + MemoryControl.available()); } // parse data in memory - final FileUpload upload = new FileUpload(DISK_FILE_ITEM_FACTORY); final List items; try { + final FileUpload upload = new FileUpload(DISK_FILE_ITEM_FACTORY); items = upload.parseRequest(request); } catch (FileUploadException e) { throw new IOException("FileUploadException " + e.getMessage());