From 154ffd7c2c69b76cd6ed3dbbc0fd89bc235a0003 Mon Sep 17 00:00:00 2001 From: orbiter Date: Tue, 26 Jun 2007 15:06:23 +0000 Subject: [PATCH] fix for wrong http connection version and SSIs git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3928 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/http/httpd.java | 2 +- source/de/anomic/http/httpdFileHandler.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/de/anomic/http/httpd.java b/source/de/anomic/http/httpd.java index c32b3b8a0..57d0fb213 100644 --- a/source/de/anomic/http/httpd.java +++ b/source/de/anomic/http/httpd.java @@ -1358,7 +1358,7 @@ public final class httpd implements serverHandler { String reqMethod = conProp.getProperty(httpHeader.CONNECTION_PROP_METHOD); if ((transferEnc != null) && !httpVersion.equals(httpHeader.HTTP_VERSION_1_1)) { - throw new IllegalArgumentException("Transfer encoding is only supported for http/1.1 connections."); + throw new IllegalArgumentException("Transfer encoding is only supported for http/1.1 connections. The current connection version is " + httpVersion); } if (!reqMethod.equals(httpHeader.METHOD_HEAD)){ diff --git a/source/de/anomic/http/httpdFileHandler.java b/source/de/anomic/http/httpdFileHandler.java index 92f6ffeab..f77f23641 100644 --- a/source/de/anomic/http/httpdFileHandler.java +++ b/source/de/anomic/http/httpdFileHandler.java @@ -706,7 +706,7 @@ public final class httpdFileHandler extends httpdAbstractHandler implements http // we can do that either in standard mode (whole thing completely) or in chunked mode // since yacy clients do not understand chunked mode, we use this only for communication with the administrator boolean yacyClient = requestHeader.userAgent().startsWith("yacy"); - boolean chunked = !method.equals(httpHeader.METHOD_HEAD) && !yacyClient; + boolean chunked = !method.equals(httpHeader.METHOD_HEAD) && !yacyClient && httpVersion.equals(httpHeader.HTTP_VERSION_1_1); if (chunked) { // send page in chunks and parse SSIs serverByteBuffer o = new serverByteBuffer();