]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/external_acl.cc
SourceFormat Enforcement (#68)
[thirdparty/squid.git] / src / external_acl.cc
index 25a4314b602342a883f50674576d6a1dc52e106d..f1e8fca917b93dd2be2a6f9d3f70a7cdd4a46ad6 100644 (file)
@@ -301,31 +301,31 @@ parse_externalAclHelper(external_acl ** list)
             (*fmt)->data.header.header = (*fmt)->data.string;
         } else
 #endif
-        if (strncmp(token,"%<{", 3) == 0) {
-            SBuf tmp("%<h");
-            tmp.append(token+2);
-            debugs(82, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: external_acl_type format %<{...} is deprecated. Use " << tmp);
-            const size_t parsedLen = (*fmt)->parse(tmp.c_str(), &quote);
-            assert(parsedLen == tmp.length());
-            assert((*fmt)->type == Format::LFT_REPLY_HEADER ||
-                   (*fmt)->type == Format::LFT_REPLY_HEADER_ELEM);
-
-        } else if (strncmp(token,"%>{", 3) == 0) {
-            SBuf tmp("%>ha");
-            tmp.append(token+2);
-            debugs(82, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: external_acl_type format %>{...} is deprecated. Use " << tmp);
-            const size_t parsedLen = (*fmt)->parse(tmp.c_str(), &quote);
-            assert(parsedLen == tmp.length());
-            assert((*fmt)->type == Format::LFT_ADAPTED_REQUEST_HEADER ||
-                   (*fmt)->type == Format::LFT_ADAPTED_REQUEST_HEADER_ELEM);
+            if (strncmp(token,"%<{", 3) == 0) {
+                SBuf tmp("%<h");
+                tmp.append(token+2);
+                debugs(82, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: external_acl_type format %<{...} is deprecated. Use " << tmp);
+                const size_t parsedLen = (*fmt)->parse(tmp.c_str(), &quote);
+                assert(parsedLen == tmp.length());
+                assert((*fmt)->type == Format::LFT_REPLY_HEADER ||
+                       (*fmt)->type == Format::LFT_REPLY_HEADER_ELEM);
+
+            } else if (strncmp(token,"%>{", 3) == 0) {
+                SBuf tmp("%>ha");
+                tmp.append(token+2);
+                debugs(82, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: external_acl_type format %>{...} is deprecated. Use " << tmp);
+                const size_t parsedLen = (*fmt)->parse(tmp.c_str(), &quote);
+                assert(parsedLen == tmp.length());
+                assert((*fmt)->type == Format::LFT_ADAPTED_REQUEST_HEADER ||
+                       (*fmt)->type == Format::LFT_ADAPTED_REQUEST_HEADER_ELEM);
 
-        } else {
-            // we can use the Format::Token::parse() method since it
-            // only pulls off one token. Since we already checked
-            // for '%' prefix above this is guaranteed to be a token.
-            const size_t len = (*fmt)->parse(token, &quote);
-            assert(len == strlen(token));
-        }
+            } else {
+                // we can use the Format::Token::parse() method since it
+                // only pulls off one token. Since we already checked
+                // for '%' prefix above this is guaranteed to be a token.
+                const size_t len = (*fmt)->parse(token, &quote);
+                assert(len == strlen(token));
+            }
 
         // process special token-specific actions (only if necessary)
 #if USE_AUTH