]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Added explicit braces to avoid ambiguous "else" and make GCC happy.
authorAlex Rousskov <rousskov@measurement-factory.com>
Tue, 16 Oct 2012 03:41:57 +0000 (21:41 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Tue, 16 Oct 2012 03:41:57 +0000 (21:41 -0600)
Pragma:no-cache has effect only when Cache-Control is absent.

src/client_side_request.cc

index 7eb4185ae3bc9184f488c6f5138559d830f89917..3eb84a86677022733e2d15e436b86d41640a232f 100644 (file)
@@ -1046,12 +1046,12 @@ clientInterpretRequestHeaders(ClientHttpRequest * http)
         request->flags.ims = 1;
 
     if (!request->flags.ignoreCc) {
-        if (request->cache_control)
+        if (request->cache_control) {
             if (request->cache_control->noCache())
                 no_cache=true;
 
         // RFC 2616: treat Pragma:no-cache as if it was Cache-Control:no-cache when Cache-Control is missing
-        else if (req_hdr->has(HDR_PRAGMA))
+        else if (req_hdr->has(HDR_PRAGMA))
             no_cache = req_hdr->hasListMember(HDR_PRAGMA,"no-cache",',');
 
         /*