From: Alex Rousskov Date: Fri, 15 Feb 2013 17:31:10 +0000 (-0700) Subject: Documented httpMaybeRemovePublic() and that it is safe for collapsed forwarding. X-Git-Tag: SQUID_3_5_0_1~444^2~68 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=09f0985d759b9ba9d6d300d43efcb2ba2e01244f;p=thirdparty%2Fsquid.git Documented httpMaybeRemovePublic() and that it is safe for collapsed forwarding. --- 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;