/*
- * $Id: ftp.cc,v 1.77 1996/11/06 23:14:34 wessels Exp $
+ * $Id: ftp.cc,v 1.78 1996/11/07 20:52:49 wessels Exp $
*
* DEBUG: section 9 File Transfer Protocol (FTP)
* AUTHOR: Harvest Derived
case 401: /* Unauthorized */
case 407: /* Proxy Authentication Required */
/* These should never be cached at all */
- storeSetPrivateKey(entry);
storeExpireNow(entry);
BIT_RESET(entry->flag, ENTRY_CACHABLE);
storeReleaseRequest(entry);
/*
- * $Id: http.cc,v 1.99 1996/11/07 18:53:15 wessels Exp $
+ * $Id: http.cc,v 1.100 1996/11/07 20:52:50 wessels Exp $
*
* DEBUG: section 11 Hypertext Transfer Protocol (HTTP)
* AUTHOR: Harvest Derived
static void
httpMakePrivate(StoreEntry * entry)
{
- storeSetPrivateKey(entry);
storeExpireNow(entry);
BIT_RESET(entry->flag, ENTRY_CACHABLE);
storeReleaseRequest(entry); /* delete object when not used */
/*
- * $Id: store.cc,v 1.155 1996/11/07 18:53:18 wessels Exp $
+ * $Id: store.cc,v 1.156 1996/11/07 20:52:52 wessels Exp $
*
* DEBUG: section 20 Storeage Manager
* AUTHOR: Harvest Derived
static void storeSwapOutHandle _PARAMS((int, int, StoreEntry *));
static void storeHashMemInsert _PARAMS((StoreEntry *));
static void storeHashMemDelete _PARAMS((StoreEntry *));
+static void storeSetPrivateKey _PARAMS((StoreEntry *));
/* Now, this table is inaccessible to outsider. They have to use a method
* to access a value in internal storage data structure. */
}
debug(20, 3, "storeReleaseRequest: FOR '%s'\n", e->key ? e->key : e->url);
e->flag |= RELEASE_REQUEST;
+ storeSetPrivateKey(e);
}
/* unlock object, return -1 if object get released after unlock
return NULL;
}
-void
+static void
storeSetPrivateKey(StoreEntry * e)
{
StoreEntry *e2 = NULL;
return 0;
return (expires > squid_curtime + when);
}
+
+int
+storeEntryValidToSend(StoreEntry * e)
+{
+ if (BIT_TEST(e->flag, RELEASE_REQUEST))
+ return 0;
+ if (BIT_TEST(e->flag, ENTRY_NEGCACHED))
+ if (entry->expires <= squid_curtime)
+ return 0;
+ if (e->store_status == STORE_ABORTED)
+ return 0;
+ return 1;
+}
+