]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
very preliminary PPNR_WIP code
authorwessels <>
Wed, 19 Aug 1998 12:05:51 +0000 (12:05 +0000)
committerwessels <>
Wed, 19 Aug 1998 12:05:51 +0000 (12:05 +0000)
src/enums.h
src/forward.cc
src/http.cc
src/protos.h
src/store.cc
src/store_client.cc

index 38aa57804692a4de64cfe6d22e24e9d71a4e7ce3..841e0efd2fb39a5c9e9f424e9b533e42a769e9b8 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: enums.h,v 1.118 1998/08/17 22:04:58 wessels Exp $
+ * $Id: enums.h,v 1.119 1998/08/19 06:05:51 wessels Exp $
  *
  *
  * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -445,7 +445,11 @@ enum {
     ENTRY_CACHABLE,
     ENTRY_DISPATCHED,
     KEY_PRIVATE,
+#ifndef PPNR_WIP
     ENTRY_UNUSED_08,
+#else
+    ENTRY_FWD_HDR_WAIT,
+#endif /* PPNR_WIP */
     ENTRY_NEGCACHED,
     ENTRY_VALIDATED,
     ENTRY_BAD_LENGTH
index 14fc9f98790541dc8adaafbca9e1abd1ab64c6b6..172c6a111b95114e8abc06d58d6de2d331bdd853 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: forward.cc,v 1.24 1998/08/17 23:50:16 wessels Exp $
+ * $Id: forward.cc,v 1.25 1998/08/19 06:05:52 wessels Exp $
  *
  * DEBUG: section 17    Request Forwarding
  * AUTHOR: Duane Wessels
@@ -404,6 +404,9 @@ fwdCheckDeferRead(int fdnotused, void *data)
 void
 fwdFail(FwdState * fwdState, int err_code, http_status http_code, int xerrno)
 {
+#ifdef PPNR_WIP
+    assert(EBIT_TEST(fwdState->entry->flag, ENTRY_FWD_HDR_WAIT));
+#endif /* PPNR_WIP */
     debug(17, 3) ("fwdFail: %s \"%s\"\n\t%s\n",
        err_type_str[err_code],
        httpStatusString(http_code),
index 4d8f6950f4898a1250f0a198f3dc3ef83ffa09c2..0941c0e02686af80d2d35a51521f18bbce29e32e 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: http.cc,v 1.308 1998/08/18 22:42:19 wessels Exp $
+ * $Id: http.cc,v 1.309 1998/08/19 06:05:53 wessels Exp $
  *
  * DEBUG: section 11    Hypertext Transfer Protocol (HTTP)
  * AUTHOR: Harvest Derived
@@ -427,11 +427,23 @@ httpReadReply(int fd, void *data)
             * we want to process the reply headers.
             */
            httpProcessReplyHeader(httpState, buf, len);
+#ifdef PPNR_WIP
+       storePPNR(entry);
+#endif /* PPNR_WIP */
        storeComplete(entry);   /* deallocates mem_obj->request */
        comm_close(fd);
     } else {
+#ifndef PPNR_WIP
        if (httpState->reply_hdr_state < 2)
+#else
+       if (httpState->reply_hdr_state < 2) {
+#endif /* PPNR_WIP */
            httpProcessReplyHeader(httpState, buf, len);
+#ifdef PPNR_WIP
+           if (httpState->reply_hdr_state == 2)
+               storePPNR(entry);
+       }
+#endif /* PPNR_WIP */
        storeAppend(entry, buf, len);
 #ifdef OPTIMISTIC_IO
        if (entry->store_status == STORE_ABORTED) {
index c8d84e29a0ac9209a31e243e96ec2d98fa9bb0e8..abac01d533ffae55dc365a2770d57431cfa81bcd 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: protos.h,v 1.250 1998/08/17 23:00:39 wessels Exp $
+ * $Id: protos.h,v 1.251 1998/08/19 06:05:54 wessels Exp $
  *
  *
  * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -731,6 +731,9 @@ extern StoreEntry *storeGet(const cache_key *);
 extern StoreEntry *storeCreateEntry(const char *, const char *, int, method_t);
 extern void storeSetPublicKey(StoreEntry *);
 extern void storeComplete(StoreEntry *);
+#ifdef PPNR_WIP
+extern void storePPNR(StoreEntry *);
+#endif /* PPNR_WIP */
 extern void storeInit(void);
 extern int storeClientWaiting(const StoreEntry *);
 extern void storeAbort(StoreEntry *, int);
index 2b1c97f9d5b0bb4e87b453720db75c5c774bc96e..11a9ac0d463aa9a79cdad2d3dbc41ecd04003d2b 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store.cc,v 1.445 1998/08/18 22:42:21 wessels Exp $
+ * $Id: store.cc,v 1.446 1998/08/19 06:05:55 wessels Exp $
  *
  * DEBUG: section 20    Storage Manager
  * AUTHOR: Harvest Derived
@@ -357,6 +357,9 @@ storeCreateEntry(const char *url, const char *log_url, int flags, method_t metho
     e->timestamp = 0;          /* set in storeTimestampsSet() */
     e->ping_status = PING_NONE;
     EBIT_SET(e->flag, ENTRY_VALIDATED);
+#ifdef PPNR_WIP
+    EBIT_SET(e->flag, ENTRY_FWD_HDR_WAIT);
+#endif /* PPNR_WIP */
     return e;
 }
 
@@ -476,6 +479,15 @@ storeComplete(StoreEntry * e)
 #endif
     InvokeHandlers(e);
     storeCheckSwapOut(e);
+#ifdef PPNR_WIP
+}
+
+void
+storePPNR(StoreEntry *e)
+{
+       assert(EBIT_TEST(e->flag, ENTRY_FWD_HDR_WAIT));
+       EBIT_CLR(e->flag, ENTRY_FWD_HDR_WAIT);
+#endif /* PPNR_WIP */
 }
 
 /*
index 9cf7e75b4ffb02753e69ba3126c3649e84ea1080..dbf91e165ab06b7879fe759d15ca8596de013178 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_client.cc,v 1.37 1998/08/18 22:42:22 wessels Exp $
+ * $Id: store_client.cc,v 1.38 1998/08/19 06:05:56 wessels Exp $
  *
  * DEBUG: section 20    Storage Manager Client-Side Interface
  * AUTHOR: Duane Wessels
@@ -172,6 +172,10 @@ storeClientCopy2(StoreEntry * e, store_client * sc)
     size_t sz;
     if (sc->flags.copy_event_pending)
        return;
+#ifdef PPNR_WIP
+    if (EBIT_TEST(e->flag, ENTRY_FWD_HDR_WAIT))
+       return;
+#endif /* PPNR_WIP */
     if (sc->flags.store_copying) {
        sc->flags.copy_event_pending = 1;
        debug(20, 3) ("storeClientCopy2: Queueing storeClientCopyEvent()\n");