From 47fbd2a7c3ffe934c6a211996ef34c8cca19de27 Mon Sep 17 00:00:00 2001 From: Alex Rousskov Date: Mon, 15 Oct 2012 21:41:57 -0600 Subject: [PATCH] Added explicit braces to avoid ambiguous "else" and make GCC happy. Pragma:no-cache has effect only when Cache-Control is absent. --- src/client_side_request.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client_side_request.cc b/src/client_side_request.cc index 7eb4185ae3..3eb84a8667 100644 --- a/src/client_side_request.cc +++ b/src/client_side_request.cc @@ -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",','); /* -- 2.47.2