From: robertc <> Date: Tue, 21 Dec 2004 22:03:01 +0000 (+0000) Subject: Bug #639: merge in Leeaan Bent's fix. X-Git-Tag: SQUID_3_0_PRE4~964 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd272b8e7e675f23becc3aeba18aec1f0a5f7cfa;p=thirdparty%2Fsquid.git Bug #639: merge in Leeaan Bent's fix. --- diff --git a/src/client_side.cc b/src/client_side.cc index 90c9947ab8..1e4b184538 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -1,6 +1,6 @@ /* - * $Id: client_side.cc,v 1.677 2004/12/20 16:30:35 robertc Exp $ + * $Id: client_side.cc,v 1.678 2004/12/21 15:03:01 robertc Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -779,8 +779,8 @@ ClientSocketContext::noteSentBodyBytes(size_t bytes) assert (http->range_iter.debt() >= 0); } - assert (http->range_iter.debt() == -1 || - http->range_iter.debt() >= 0); + /* debt() always stops at -1, below that is a bug */ + assert (http->range_iter.debt() >= -1); } bool diff --git a/src/client_side_reply.cc b/src/client_side_reply.cc index 376ab44e51..3b0693b88a 100644 --- a/src/client_side_reply.cc +++ b/src/client_side_reply.cc @@ -1,6 +1,6 @@ /* - * $Id: client_side_reply.cc,v 1.79 2004/12/20 17:35:58 robertc Exp $ + * $Id: client_side_reply.cc,v 1.80 2004/12/21 15:03:01 robertc Exp $ * * DEBUG: section 88 Client-side Reply Routines * AUTHOR: Robert Collins (Originally Duane Wessels in client_side.c) @@ -211,14 +211,11 @@ clientReplyContext::getNextNode() const void clientReplyContext::triggerInitialStoreRead() { - StoreIOBuffer tempBuffer; /* when confident, 0 becomes reqofs, and then this factors into * startSendProcess */ assert(reqofs == 0); - tempBuffer.offset = 0; - tempBuffer.length = next()->readBuffer.length; - tempBuffer.data = next()->readBuffer.data; + StoreIOBuffer tempBuffer (next()->readBuffer.length, 0, next()->readBuffer.data); storeClientCopy(sc, http->storeEntry(), tempBuffer, SendMoreData, this); } @@ -1592,20 +1589,6 @@ clientReplyContext::identifyFoundObject(StoreEntry *newEntry) return; } - /* We don't cache any range requests (for now!) -- adrian */ - /* RBC - and we won't until the store supports sparse objects. - * I suspec this test is incorrect though, as we can extract ranges from - * a fully cached object - */ - if (r->flags.range) { - /* XXX: test to see if we can satisfy the range with the cached object */ - debug(85, 3) ("clientProcessRequest2: force MISS due to range presence\n"); - http->storeEntry(NULL); - http->logType = LOG_TCP_MISS; - doGetMoreData(); - return; - } - debug(85, 3) ("clientProcessRequest2: default HIT\n"); http->logType = LOG_TCP_HIT; doGetMoreData();