From 9dc1202d2e364bf2fd9b707374f899ca222a04bf Mon Sep 17 00:00:00 2001 From: wessels <> Date: Fri, 11 Sep 1998 01:48:55 +0000 Subject: [PATCH] further safegurads in httpMaybeRemovePublic. return if the key is PUBLIC, and assert that we don't remove the "current" entry. --- src/http.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/http.cc b/src/http.cc index 720574c0fd..73b0bfd7e5 100644 --- a/src/http.cc +++ b/src/http.cc @@ -1,6 +1,6 @@ /* - * $Id: http.cc,v 1.315 1998/09/10 19:45:53 wessels Exp $ + * $Id: http.cc,v 1.316 1998/09/10 19:48:55 wessels Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -134,6 +134,8 @@ httpMaybeRemovePublic(StoreEntry * e, http_status status) int remove = 0; const cache_key *key; StoreEntry *pe; + if (!EBIT_TEST(e->flag, KEY_PRIVATE)) + return; switch (status) { case HTTP_OK: case HTTP_NON_AUTHORITATIVE_INFORMATION: @@ -161,6 +163,7 @@ httpMaybeRemovePublic(StoreEntry * e, http_status status) key = storeKeyPublic(e->mem_obj->url, e->mem_obj->method); if ((pe = storeGet(key)) == NULL) return; + assert(e != pe); storeRelease(pe); } -- 2.47.3