From: wessels <> Date: Wed, 12 Jul 2000 22:20:02 +0000 (+0000) Subject: DW: X-Git-Tag: SQUID_3_0_PRE1~1904 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2a6b906c7aa321bb4cadfa2ec0c655d98273a81d;p=thirdparty%2Fsquid.git DW: - A patch from 2.3 branch that allows "content-length: 0" in GET and HEAD requests. --- diff --git a/src/client_side.cc b/src/client_side.cc index 14cb360b8a..2eddd3ae1a 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -1,6 +1,6 @@ /* - * $Id: client_side.cc,v 1.490 2000/06/27 22:05:59 hno Exp $ + * $Id: client_side.cc,v 1.491 2000/07/12 16:20:02 wessels Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -914,16 +914,15 @@ clientSetKeepaliveFlag(clientHttpRequest * http) static int clientCheckContentLength(request_t * r) { - int has_cont_len = (r->content_length >= 0); switch (r->method) { case METHOD_PUT: case METHOD_POST: /* PUT/POST requires a request entity */ - return has_cont_len; + return (r->content_length >= 0); case METHOD_GET: case METHOD_HEAD: /* We do not want to see a request entity on GET/HEAD requests */ - return !has_cont_len; + return (r->content_length <= 0); default: /* For other types of requests we don't care */ return 1;