]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
SourceFormat Enforcement
authorAutomatic source maintenance <squidadm@squid-cache.org>
Sun, 7 Mar 2010 01:13:52 +0000 (18:13 -0700)
committerAutomatic source maintenance <squidadm@squid-cache.org>
Sun, 7 Mar 2010 01:13:52 +0000 (18:13 -0700)
src/HttpHeaderTools.cc
src/auth/digest/auth_digest.cc
src/helper.cc

index 2924e858171f1ae1e161b24858a16588fa7461cf..4ae9bfa53bc405986720b568fee867af31a18b34 100644 (file)
@@ -342,15 +342,15 @@ httpHeaderParseQuotedString(const char *start, String *val)
     pos = start + 1;
 
     while (*pos != '"') {
-       bool quoted = (*pos == '\\');
-       if (quoted)
-           pos++;
+        bool quoted = (*pos == '\\');
+        if (quoted)
+            pos++;
         if (!*pos) {
             debugs(66, 2, "failed to parse a quoted-string header field near '" << start << "'");
             val->clean();
             return 0;
         }
-       end = pos + strcspn(pos + quoted, "\"\\") + quoted;
+        end = pos + strcspn(pos + quoted, "\"\\") + quoted;
         val->append(pos, end-pos);
         pos = end;
     }
index d4dc4064d26041f0c2d6c5bd738c0649e38e5d12..a884b62500500ce9fb3d6b487717d5fcdfa41fbc 100644 (file)
@@ -533,8 +533,8 @@ digestScheme::done()
         helperShutdown(digestauthenticators);
 
     if (DigestFieldsInfo) {
-       httpHeaderDestroyFieldsInfo(DigestFieldsInfo, DIGEST_ENUM_END);
-       DigestFieldsInfo = NULL;
+        httpHeaderDestroyFieldsInfo(DigestFieldsInfo, DIGEST_ENUM_END);
+        DigestFieldsInfo = NULL;
     }
 
     authdigest_initialised = 0;
@@ -1126,27 +1126,27 @@ AuthDigestConfig::decode(char const *proxy_auth)
     while (strListGetItem(&temp, ',', &item, &ilen, &pos)) {
         /* isolate directive name & value */
         size_t nlen;
-       size_t vlen;
+        size_t vlen;
         if ((p = (const char *)memchr(item, '=', ilen)) && (p - item < ilen)) {
             nlen = p++ - item;
-           vlen = ilen - (p - item);
+            vlen = ilen - (p - item);
         } else {
             nlen = ilen;
-           vlen = 0;
-       }
+            vlen = 0;
+        }
 
-       /* parse value. auth-param     = token "=" ( token | quoted-string ) */
+        /* parse value. auth-param     = token "=" ( token | quoted-string ) */
         String value;
-       if (vlen > 0) {
-           if (*p == '"') {
-               if (!httpHeaderParseQuotedString(p, &value)) {
-                   debugs(29, 9, "authDigestDecodeAuth: Failed to parse attribute '" << item << "' in '" << temp << "'");
-                   continue;
-               }
-           } else {
-               value.limitInit(p, vlen);
-           }
-       } else {
+        if (vlen > 0) {
+            if (*p == '"') {
+                if (!httpHeaderParseQuotedString(p, &value)) {
+                    debugs(29, 9, "authDigestDecodeAuth: Failed to parse attribute '" << item << "' in '" << temp << "'");
+                    continue;
+                }
+            } else {
+                value.limitInit(p, vlen);
+            }
+        } else {
             debugs(29, 9, "authDigestDecodeAuth: Failed to parse attribute '" << item << "' in '" << temp << "'");
             continue;
         }
index bbbefa5990a51c2a24d7dae22a390c68d40e5720..b7ff5dc6a602ed2e8ee215d07156657171653e7a 100644 (file)
@@ -200,7 +200,7 @@ helperStatefulOpenServers(statefulhelper * hlp)
         return;
 
     if (hlp->childs.concurrency)
-       debugs(84, 0, "ERROR: concurrency= is not yet supported for stateful helpers ('" << hlp->cmdline << "')");
+        debugs(84, 0, "ERROR: concurrency= is not yet supported for stateful helpers ('" << hlp->cmdline << "')");
 
     char *progname = hlp->cmdline->key;