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
pull/1/head
orbiter 18 years ago
parent 3970482427
commit 154ffd7c2c

@ -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)){

@ -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();

Loading…
Cancel
Save