From: Amos Jeffries Date: Fri, 26 Dec 2008 21:47:16 +0000 (+1300) Subject: Author: Christos Tsantilas X-Git-Tag: SQUID_3_0_STABLE12~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=982480782fd8d51a38a40aac794ebf7960627500;p=thirdparty%2Fsquid.git Author: Christos Tsantilas Bug 2542: squid fails to resume dowload (and breaks content) when any ICAP filter is attached In the case the icap client is enabled, the ServerStateData::handleMoreAdaptedBodyAvailable called to handle the incoming data from the ICAP server. Inside this function a StoreIOBuffer created to pass the data to the related StoreEntry. The bug is that the offset passed to the StoreIOBuffer did not count the 206 response offsets. This patch uses the ServerStateData::currentOffset to compute the correct offset (which also used in the case the icap client is not enabled). --- diff --git a/src/Server.cc b/src/Server.cc index 8817d1a1e5..476dfd8153 100644 --- a/src/Server.cc +++ b/src/Server.cc @@ -562,7 +562,8 @@ ServerStateData::handleMoreAdaptedBodyAvailable() assert(entry); BodyPipeCheckout bpc(*adaptedBodySource); - const StoreIOBuffer ioBuf(&bpc.buf, bpc.offset); + const StoreIOBuffer ioBuf(&bpc.buf, currentOffset); + currentOffset += bpc.buf.size; entry->write(ioBuf); bpc.buf.consume(contentSize); bpc.checkIn();