]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
DW:
authorwessels <>
Wed, 12 Jul 2000 22:20:02 +0000 (22:20 +0000)
committerwessels <>
Wed, 12 Jul 2000 22:20:02 +0000 (22:20 +0000)
 - A patch from 2.3 branch that allows "content-length: 0" in GET and
   HEAD requests.

src/client_side.cc

index 14cb360b8a68b9d0b319a8210feef701cb090b03..2eddd3ae1a02725145219eda88516a255ec2dd06 100644 (file)
@@ -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;