On Fri, Aug 09, 2002, Adrian Chadd wrote:
> 
> .. here's the patch, along with some extra crap. I'll trim the extra
> crap out before committing. What do people think?
patch ..
Index: client_side.c
===================================================================
RCS file: /server/cvs-server/squid/squid/src/client_side.c,v
retrieving revision 1.583
diff -u -r1.583 client_side.c
--- client_side.c       20 Jul 2002 23:23:17 -0000      1.583
+++ client_side.c       9 Aug 2002 08:19:53 -0000
@@ -1697,6 +1697,8 @@
 {
     ConnStateData *conn = http->conn;
     StoreEntry *entry;
+    store_client *tsc = http->sc;
+
     debug(33, 3) ("clientKeepaliveNextRequest: FD %d\n", conn->fd);
     conn->defer.until = 0;     /* Kick it to read a new request */
     httpRequestFree(http);
@@ -1734,13 +1736,24 @@
        if (0 == storeClientCopyPending(http->sc, entry, http)) {
            if (EBIT_TEST(entry->flags, ENTRY_ABORTED))
                debug(33, 0) ("clientKeepaliveNextRequest: ENTRY_ABORTED\n");
-           http->reqofs = 0;
-           storeClientCopy(http->sc, entry,
-               http->out.offset,
-               HTTP_REQBUF_SZ,
-               http->reqbuf,
-               clientSendMoreData,
-               http);
+            /* If we have any data in our reqbuf, use it */
+           if (http->reqsize > 0) {
+               /* XXX is this even valid? passing reqbuf in for itself..? (adrian) */
+                clientSendMoreData(http, http->reqbuf, http->reqsize);
+           } else {
+               assert(http->out.offset == 0);
+                /*
+                * here - have no data (don't ever think we get here..)
+                 * so lets start copying..
+                * -- adrian
+                */
+               storeClientCopy(http->sc, entry,
+                   http->out.offset,
+                   HTTP_REQBUF_SZ,
+                   http->reqbuf,
+                   clientSendMoreData,
+                   http);
+            }
        }
     }
 }
.. which makes sense to me.
adrian
Received on Fri Aug 09 2002 - 02:22:20 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:16:01 MST