From 09f0985d759b9ba9d6d300d43efcb2ba2e01244f Mon Sep 17 00:00:00 2001 From: Alex Rousskov Date: Fri, 15 Feb 2013 10:31:10 -0700 Subject: [PATCH] Documented httpMaybeRemovePublic() and that it is safe for collapsed forwarding. --- src/http.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/http.cc b/src/http.cc index 71db3ead50..0c03e62bc2 100644 --- a/src/http.cc +++ b/src/http.cc @@ -188,6 +188,8 @@ HttpStateData::httpTimeout(const CommTimeoutCbParams ¶ms) serverConnection->close(); } +/// Remove an existing public store entry if the incoming response (to be +/// stored in a currently private entry) is going to invalidate it. static void httpMaybeRemovePublic(StoreEntry * e, http_status status) { @@ -195,6 +197,8 @@ httpMaybeRemovePublic(StoreEntry * e, http_status status) int forbidden = 0; StoreEntry *pe; + // If the incoming response already goes into a public entry, then there is + // nothing to remove. This protects ready-for-collapsing entries as well. if (!EBIT_TEST(e->flags, KEY_PRIVATE)) return; -- 2.47.2