From: Alex Rousskov Date: Thu, 8 Jun 2017 18:09:28 +0000 (-0600) Subject: Clarified v5 r15168 code logic. No functionality changes. X-Git-Tag: M-staged-PR71~136 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3d5e45297199c3cf69569914a81780641dc35c9;p=thirdparty%2Fsquid.git Clarified v5 r15168 code logic. No functionality changes. Detected by Coverity Scan. Issue 1412065 (MISSING_BREAK). --- diff --git a/src/http.cc b/src/http.cc index a47e137a50..3b1ffad714 100644 --- a/src/http.cc +++ b/src/http.cc @@ -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");