--------------------- PatchSet 1736 Date: 2001/03/18 22:19:05 Author: adri Branch: modio Tag: (none) Log: Fix up some evil logic that I broke. the http->out.offset is actually used to check whether we're parsing the request or not, so if we *are* parsing the request, don't increment out.offset. This code seems to do the right thing, both with what the existing http code expects, and my storeClientCopy() changes. Members: src/client_side.c:1.2.2.22->1.2.2.23 Index: squid/src/client_side.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/client_side.c,v retrieving revision 1.2.2.22 retrieving revision 1.2.2.23 diff -u -r1.2.2.22 -r1.2.2.23 --- squid/src/client_side.c 21 Feb 2001 18:46:34 -0000 1.2.2.22 +++ squid/src/client_side.c 18 Mar 2001 22:19:05 -0000 1.2.2.23 @@ -1,6 +1,6 @@ /* - * $Id: client_side.c,v 1.2.2.22 2001/02/21 18:46:34 adri Exp $ + * $Id: client_side.c,v 1.2.2.23 2001/03/18 22:19:05 adri Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -492,11 +492,10 @@ /* continue */ } else { http->bufofs += size; - http->out.offset += size; assert(http->bufofs <= CLIENT_SOCK_SZ); storeClientCopy(entry, - http->out.offset, - http->out.offset, + http->out.offset + http->bufofs, + http->out.offset + http->bufofs, CLIENT_SOCK_SZ - http->bufofs, buf + http->bufofs, clientHandleIMSReply, @@ -1262,11 +1261,10 @@ } else { debug(33, 3) ("clientCacheHit: waiting for HTTP reply headers\n"); http->bufofs += size; - http->out.offset += size; assert(http->bufofs <= CLIENT_SOCK_SZ); storeClientCopy(e, - http->out.offset, - http->out.offset, + http->out.offset + http->bufofs, + http->out.offset + http->bufofs, CLIENT_SOCK_SZ - http->bufofs, buf + http->bufofs, clientCacheHit, @@ -1524,11 +1522,10 @@ } else if (size < CLIENT_SOCK_SZ && entry->store_status == STORE_PENDING) { /* wait for more to arrive */ http->bufofs += size; - http->out.offset += size; assert(http->bufofs <= CLIENT_SOCK_SZ); storeClientCopy(entry, - http->out.offset, - http->out.offset, + http->out.offset + http->bufofs, + http->out.offset + http->bufofs, CLIENT_SOCK_SZ - http->bufofs, buf + http->bufofs, clientSendMoreData,