From c8f5adea4d37c80120466d2609b858044d637bfc Mon Sep 17 00:00:00 2001 From: hermens Date: Thu, 16 Feb 2006 11:45:32 +0000 Subject: [PATCH] - don't send Message Body on HEAD requests, even in the case of an error git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1669 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/http/httpd.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/de/anomic/http/httpd.java b/source/de/anomic/http/httpd.java index ec4eeb2ed..34c3989e1 100644 --- a/source/de/anomic/http/httpd.java +++ b/source/de/anomic/http/httpd.java @@ -1141,9 +1141,11 @@ public final class httpd implements serverHandler { header.put(httpHeader.CONTENT_LENGTH, Integer.toString(result.length)); header.put(httpHeader.PRAGMA, "no-cache"); sendRespondHeader(conProp,respond,httpVersion,httpStatusCode,httpStatusText,header); - - // write the array to the client - serverFileUtils.write(result, respond); + + if (! method.equals(httpHeader.METHOD_HEAD)) { + // write the array to the client + serverFileUtils.write(result, respond); + } respond.flush(); } catch (Exception e) { throw new IOException(e.getMessage());