--------------------- PatchSet 1587 Date: 2005/08/24 17:33:33 Author: dwsquid Branch: squid3-icap Tag: (none) Log: - Don't update or use currentOffset when sending data to the ICAP client. - in takeAdapted(), rep and reply may not actually point to the same thing. Updated comment about this. Members: src/http.cc:1.49.2.10->1.49.2.11 Index: squid3/src/http.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/http.cc,v retrieving revision 1.49.2.10 retrieving revision 1.49.2.11 diff -u -r1.49.2.10 -r1.49.2.11 --- squid3/src/http.cc 24 Aug 2005 15:27:58 -0000 1.49.2.10 +++ squid3/src/http.cc 24 Aug 2005 17:33:33 -0000 1.49.2.11 @@ -1,6 +1,6 @@ /* - * $Id: http.cc,v 1.49.2.10 2005/08/24 15:27:58 rousskov Exp $ + * $Id: http.cc,v 1.49.2.11 2005/08/24 17:33:33 dwsquid Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -1124,7 +1124,7 @@ if (len > end) { #if ICAP_CLIENT - icap->sendMoreData (StoreIOBuffer(len - end, currentOffset, (char*)buf+end)); + icap->sendMoreData (StoreIOBuffer(len - end, 0, (char*)buf+end)); #else entry->write (StoreIOBuffer(len - end, currentOffset, (char*)buf+end)); @@ -1137,7 +1137,7 @@ flags.headers_pushed = 1; } else { #if ICAP_CLIENT - icap->sendMoreData (StoreIOBuffer(len, currentOffset, (char*)buf)); + icap->sendMoreData (StoreIOBuffer(len, 0, (char*)buf)); #else entry->write(StoreIOBuffer(len, currentOffset, (char*)buf)); @@ -1996,11 +1996,10 @@ assert(this); storeEntryReplaceObject(entry, rep); /* - * NOTE: reply and rep point to the same thing because we passed - * this->reply to startRespMod() and now its being passed - * back to us as rep. We could just remove the function parameter. + * After calling storeEntryReplaceObject() we give up control + * of the rep and this->reply pointers. */ - reply = NULL; + rep = reply = NULL; haveParsedReplyHeaders(); }