Re: Deferring delivery because other requests are in front

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Wed, 03 Dec 1997 21:34:29 +0100

I have a patch for persistent connection that seems to get rid of this
message.. It was previously seen on some occasions where pipelining was
not used (Netscape 3.01 client for example, no pipelining there it
seems), namely on IMS queries and other responses that did not include a
body part..

The patch is attached to this message.

Duane, I sent this to you a long time (several days) ago.. or at least
think I did...

---
Henrik Nordström
Duane Wessels wrote:
> 
> Evan Champion writes:
> 
> >What does this message mean in the cache.log on squid 1.2b7?
> >
> >97/12/02 19:35:02| clientSendMoreData: Deferring delivery of
> >97/12/02 19:35:02| --> http://retsik-software.com/a32_50.exe
> >97/12/02 19:35:02| --> because other requests are in front
> 
> Its not an error, it just a notice that HTTP/1.1 pipelined requests
> are working.  Two (or more) requests have been received.  The second
> reqeust can not be sent to the client until the first has
> finished.
> 
> Once we are sure the bugs are all worked out, the debug message
> will not be shown during normal operation.
> 
> Duane W.

Index: squid/src/http.c
diff -u squid/src/http.c:1.1.1.5 squid/src/http.c:1.1.1.5.2.1
--- squid/src/http.c:1.1.1.5 Sun Nov 30 14:37:47 1997
+++ squid/src/http.c Sun Nov 30 16:05:52 1997
@@ -573,20 +573,32 @@
         return 0;
     debug(11, 5) ("httpPconnTransferDone: content_length=%d\n",
         reply->content_length);
-#if DONT_THINK_THIS_MATTERS
+ /*
+ * We haven't received the headers yet..
+ */
+ if (httpState->reply_hdr_state < 2) {
+ debug(11, 5) ("httpPconnTransferDone: wait for more headers\n");
+ return 0;
+ }
     /*
- * !200 replies maybe don't have content-length, so
- * if we saw the end of the headers then try being persistent.
+ * Some responses does not include a body regardless of any
+ * headers, so if we saw the end of the headers then we are
+ * done with this request.
      */
- if (reply->code != 200)
- if (httpState->reply_hdr_state > 1)
- return 1;
-#endif
+ if ( (reply->code >= 100 && reply->code < 200)
+ || reply->code == 204 || reply->code == 304) {
+ debug(11, 5) ("httpPconnTransferDone: Transfer complete, headers-only response\n");
+ return 1;
+ }
     /*
- * If there is no content-length, then we probably can't be persistent
+ * If there is no content-length, then we can't tell...
+ * XXX: Pending requests should immediately be moved
+ * to a new connection!!! THIS NEEDS TO BE FIXED
      */
- if (reply->content_length < 0)
+ if (reply->content_length < 0) {
+ debug(11, 1) ("httpPconnTransferDone: no content length!\n");
         return 0;
+ }
     /*
      * If there is a content_length, see if we've got all of it. If so,
      * then we can recycle this connection.
@@ -594,8 +606,11 @@
     debug(11, 5) ("httpPconnTransferDone: hdr_sz=%d\n", reply->hdr_sz);
     debug(11, 5) ("httpPconnTransferDone: inmem_hi=%d\n",
         mem->inmem_hi);
- if (mem->inmem_hi < reply->content_length + reply->hdr_sz)
+ if (mem->inmem_hi < reply->content_length + reply->hdr_sz) {
+ debug(11, 5) ("httpPconnTransferDone: wait for more data\n");
         return 0;
+ }
+ debug(11, 5) ("httpPconnTransferDone: Transfer complete\n");
     return 1;
 }
 
Received on Wed Dec 03 1997 - 13:08:08 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:37:49 MST