]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #639: merge in Leeaan Bent's fix.
authorrobertc <>
Tue, 21 Dec 2004 22:03:01 +0000 (22:03 +0000)
committerrobertc <>
Tue, 21 Dec 2004 22:03:01 +0000 (22:03 +0000)
src/client_side.cc
src/client_side_reply.cc

index 90c9947ab8b43ecf3f26dc79d8f0452ff1b49f26..1e4b184538e54d99c72f253126db6bf5c53a05f0 100644 (file)
@@ -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
index 376ab44e5128c5a4b5af901248812d0c3a37900a..3b0693b88abebdc3c63e67817c301c0564de5a7f 100644 (file)
@@ -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();