*) Bugfix for content length check

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1666 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
theli 19 years ago
parent 8ffc6e35ad
commit a354bc2ec1

@ -1202,11 +1202,7 @@ public final class httpd implements serverHandler {
if ((transferEnc != null) && !httpVersion.equals(httpHeader.HTTP_VERSION_1_1)) {
throw new IllegalArgumentException("Transfer encoding is only supported for http/1.1 connections.");
}
if (reqMethod.equals(httpHeader.METHOD_HEAD)) {
if (contentLength >= 0) {
throw new IllegalArgumentException("Http HEAD response messages MUST NOT contain a content-length.");
}
}
if (!reqMethod.equals(httpHeader.METHOD_HEAD)){
if (!conProp.getProperty(httpHeader.CONNECTION_PROP_PERSISTENT,"close").equals("close")) {
if (transferEnc == null && contentLength < 0) {

Loading…
Cancel
Save