--------------------- PatchSet 1867 Date: 2005/09/24 05:30:34 Author: rousskov Branch: squid3-icap Tag: (none) Log: - Renamed sendingABody() to expectVirginBody() to avoid a mismatch with the ICAPXaction's send/receive/read/write/... terminology (see the top of the ICAPXaction.cc file) and to distinguish a virgin body from an adapted body that we may or may not be reading and sending. If we expect to receive a virgin body from the ICAP Anchor, we also expect (and promise) to write it to the ICAP server. - Made expectVirginBody() const. Members: src/ICAPXaction.cc:1.1.2.28->1.1.2.29 src/ICAPXaction.h:1.1.2.14->1.1.2.15 Index: squid3/src/ICAPXaction.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/Attic/ICAPXaction.cc,v retrieving revision 1.1.2.28 retrieving revision 1.1.2.29 diff -u -r1.1.2.28 -r1.1.2.29 --- squid3/src/ICAPXaction.cc 24 Sep 2005 05:14:52 -0000 1.1.2.28 +++ squid3/src/ICAPXaction.cc 24 Sep 2005 05:30:34 -0000 1.1.2.29 @@ -245,7 +245,7 @@ if (state.isWriting || state.doneWriting) return; - if (!sendingABody()) { + if (!expectVirginBody()) { state.doneWriting = true; return; } @@ -713,7 +713,7 @@ if (const MsgPipeData::Header *prime = virgin->data->header) encapsulateHead(buf, "res-hdr", &httpBuf, prime); - if (!sendingABody()) + if (!expectVirginBody()) buf->Printf("null-body=%d", httpBuf.contentSize()); else if (m == reqmod) buf->Printf("req-body=%d", httpBuf.contentSize()); @@ -816,10 +816,10 @@ } /* - * Indicate whether or not there is an HTTP body associated with + * Indicate whether or not there is a virgin HTTP body associated with * this ICAP transaction */ -bool ICAPXaction::sendingABody() +bool ICAPXaction::expectVirginBody() const { if (virgin->data->body->contentSize()) // XXX bug - body may come later return true; Index: squid3/src/ICAPXaction.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/Attic/ICAPXaction.h,v retrieving revision 1.1.2.14 retrieving revision 1.1.2.15 diff -u -r1.1.2.14 -r1.1.2.15 --- squid3/src/ICAPXaction.h 23 Sep 2005 23:11:58 -0000 1.1.2.14 +++ squid3/src/ICAPXaction.h 24 Sep 2005 05:30:34 -0000 1.1.2.15 @@ -1,6 +1,6 @@ /* - * $Id: ICAPXaction.h,v 1.1.2.14 2005/09/23 23:11:58 dwsquid Exp $ + * $Id: ICAPXaction.h,v 1.1.2.15 2005/09/24 05:30:34 rousskov Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -99,7 +99,7 @@ void parseBody(); bool parsePresentBody(); void maybeAllocateHttpMsg(); - bool sendingABody(); + bool expectVirginBody() const; void pickService();