From: wessels <> Date: Wed, 10 Jun 1998 12:00:22 +0000 (+0000) Subject: incorrect assertions with new body-copying code. CONNECT requests X-Git-Tag: SQUID_3_0_PRE1~3143 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e34195c0c1235f3c22b75c9e3f8bf693dbf853b9;p=thirdparty%2Fsquid.git incorrect assertions with new body-copying code. CONNECT requests have no content-length, but are NON-GET, so the assertion failed. --- diff --git a/src/client_side.cc b/src/client_side.cc index 69ee463565..6c1510d757 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -1,6 +1,6 @@ /* - * $Id: client_side.cc,v 1.335 1998/06/10 05:48:48 wessels Exp $ + * $Id: client_side.cc,v 1.336 1998/06/10 06:00:22 wessels Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -2460,8 +2460,7 @@ clientReadRequest(int fd, void *data) if (request->method != METHOD_GET) { int cont_len = httpHeaderGetInt(&request->header, HDR_CONTENT_LENGTH); int copy_len = XMIN(cont_len, conn->in.offset); - assert(cont_len > -1); - if (conn->in.offset && copy_len > 0) { + if (copy_len > 0) { assert(conn->in.offset >= copy_len); request->body_sz = copy_len; request->body = xmalloc(request->body_sz);