--------------------- PatchSet 5893 Date: 2003/08/21 20:47:13 Author: dwsquid Branch: icap-2_5 Tag: (none) Log: some better (more verbose) debugging for httpPconnTransferDone() Members: src/http.c:1.17.6.3.6.6->1.17.6.3.6.7 Index: squid/src/http.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/http.c,v retrieving revision 1.17.6.3.6.6 retrieving revision 1.17.6.3.6.7 diff -u -r1.17.6.3.6.6 -r1.17.6.3.6.7 --- squid/src/http.c 21 Aug 2003 20:45:39 -0000 1.17.6.3.6.6 +++ squid/src/http.c 21 Aug 2003 20:47:13 -0000 1.17.6.3.6.7 @@ -1,6 +1,6 @@ /* - * $Id: http.c,v 1.17.6.3.6.6 2003/08/21 20:45:39 dwsquid Exp $ + * $Id: http.c,v 1.17.6.3.6.7 2003/08/21 20:47:13 dwsquid Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -533,25 +533,30 @@ debug(11, 5) ("httpPconnTransferDone: content_length=%d\n", reply->content_length); /* If we haven't seen the end of reply headers, we are not done */ - if (httpState->reply_hdr_state < 2) + if (httpState->reply_hdr_state < 2) { + debug(11, 3) ("httpPconnTransferDone: reply_hdr_state=%d, returning 0\n", + httpState->reply_hdr_state); return 0; - + } clen = httpReplyBodySize(httpState->request->method, reply); /* If there is no message body, we can be persistent */ if (0 == clen) { - debug(11, 3) ("GEE:httpPconnTransferDone: FD %d no content returning 1\n", httpState->fd); + debug(11, 3) ("httpPconnTransferDone: no content returning 1\n"); return 1; } /* If the body size is unknown we must wait for EOF */ - if (clen < 0) + if (clen < 0) { + debug(11, 3) ("httpPconnTransferDone: body size unknown, wait for EOF, returning 0\n"); return 0; - - + } /* If the body size is known, we must wait until we've gotten all of it. */ - if (mem->inmem_hi < reply->content_length + reply->hdr_sz) + if (mem->inmem_hi < reply->content_length + reply->hdr_sz) { + debug(11, 3) ("httpPconnTransferDone: mem->inmem_hi=%d, returning 0\n", + (int) mem->inmem_hi); return 0; + } /* We got it all */ - debug(11, 3) ("GEE:httpPconnTransferDone: FD %d we got it all %d %d %d\n", + debug(11, 3) ("httpPconnTransferDone: FD %d we got it all %d %d %d\n", httpState->fd, (int) mem->inmem_hi, reply->content_length, reply->hdr_sz); return 1; }