]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Clarified v5 r15168 code logic. No functionality changes.
authorAlex Rousskov <rousskov@measurement-factory.com>
Thu, 8 Jun 2017 18:09:28 +0000 (12:09 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Thu, 8 Jun 2017 18:09:28 +0000 (12:09 -0600)
Detected by Coverity Scan. Issue 1412065 (MISSING_BREAK).

src/http.cc

index a47e137a501575e27327816cf81f44039966e345..3b1ffad714fc005416a99048dca8116faf523c7e 100644 (file)
@@ -504,7 +504,7 @@ HttpStateData::reusableReply(HttpStateData::ReuseDecision &decision)
             decision.make(ReuseDecision::doNotCacheButShare, "Expires <= Date");
         break;
 
-    /* Some responses can be negatively cached */
+    /* These responses can be negatively cached. Most can also be shared. */
     case Http::scNoContent:
     case Http::scUseProxy:
     case Http::scForbidden:
@@ -517,11 +517,11 @@ HttpStateData::reusableReply(HttpStateData::ReuseDecision &decision)
     case Http::scServiceUnavailable:
     case Http::scGatewayTimeout:
     case Http::scMisdirectedRequest:
-
         statusAnswer = ReuseDecision::doNotCacheButShare;
         statusReason = shareableError;
-    case Http::scBadRequest:
+        // fall through to the actual decision making below
 
+    case Http::scBadRequest: // no sharing; perhaps the server did not like something specific to this request
 #if USE_HTTP_VIOLATIONS
         if (Config.negativeTtl > 0)
             decision.make(ReuseDecision::cacheNegatively, "Config.negativeTtl > 0");