]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Documented httpMaybeRemovePublic() and that it is safe for collapsed forwarding.
authorAlex Rousskov <rousskov@measurement-factory.com>
Fri, 15 Feb 2013 17:31:10 +0000 (10:31 -0700)
committerAlex Rousskov <rousskov@measurement-factory.com>
Fri, 15 Feb 2013 17:31:10 +0000 (10:31 -0700)
src/http.cc

index 71db3ead50b8c019c9504494215e4c8d249dc779..0c03e62bc2618c29cd3c9f1d8c3edac14216acaa 100644 (file)
@@ -188,6 +188,8 @@ HttpStateData::httpTimeout(const CommTimeoutCbParams &params)
     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;