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

index 6cc35be11350c7f163ac9c77735dc9c2264f21f2..8f5a35c68404cca63a99d49e9e757ba32d6a2d73 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 2e33f07940fc48acb8b1f650260ca094cf4fea22..c8285bdeeaa28b7e256ab318dc9f0fc5d0f36269 100644 (file)
@@ -1127,27 +1127,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 '" << temp << "' in '" << proxy_auth << "'");
-                   continue;
-               }
-           } else {
-               value.limitInit(p, vlen);
-           }
-       } else {
+        if (vlen > 0) {
+            if (*p == '"') {
+                if (!httpHeaderParseQuotedString(p, &value)) {
+                    debugs(29, 9, "authDigestDecodeAuth: Failed to parse attribute '" << temp << "' in '" << proxy_auth << "'");
+                    continue;
+                }
+            } else {
+                value.limitInit(p, vlen);
+            }
+        } else {
             debugs(29, 9, "authDigestDecodeAuth: Failed to parse attribute '" << temp << "' in '" << proxy_auth << "'");
             continue;
         }