--------------------- PatchSet 8945 Date: 2007/02/24 13:13:42 Author: hno Branch: http11 Tag: (none) Log: RFC2616 4.4, Content-Length MUST be ignored if Transfer-Encoding is used some servers emit both Transfer-Encoding and Content-Length. Members: src/http.c:1.49.6.5->1.49.6.6 Index: squid/src/http.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/http.c,v retrieving revision 1.49.6.5 retrieving revision 1.49.6.6 diff -u -r1.49.6.5 -r1.49.6.6 --- squid/src/http.c 24 Feb 2007 08:28:10 -0000 1.49.6.5 +++ squid/src/http.c 24 Feb 2007 13:13:42 -0000 1.49.6.6 @@ -1,6 +1,6 @@ /* - * $Id: http.c,v 1.49.6.5 2007/02/24 08:28:10 hno Exp $ + * $Id: http.c,v 1.49.6.6 2007/02/24 13:13:42 hno Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -506,8 +506,8 @@ stringClean(&tr); if (httpState->flags.chunked && reply->content_length >= 0) { /* Can't have a content-length in chunked encoding */ - reply->sline.status = HTTP_INVALID_HEADER; - return done; + reply->content_length = -1; + httpHeaderDelById(&reply->header, HDR_CONTENT_LENGTH); } } if (!httpState->flags.chunked) { @@ -1343,7 +1343,7 @@ { const int offset = mb->size; memBufPrintf(mb, "%s %s HTTP/1.1\r\n", - RequestMethodStr[request->method].str, + RequestMethods[request->method].str, strLen(request->urlpath) ? strBuf(request->urlpath) : "/"); /* build and pack headers */ {