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;
}
helperShutdown(digestauthenticators);
if (DigestFieldsInfo) {
- httpHeaderDestroyFieldsInfo(DigestFieldsInfo, DIGEST_ENUM_END);
- DigestFieldsInfo = NULL;
+ httpHeaderDestroyFieldsInfo(DigestFieldsInfo, DIGEST_ENUM_END);
+ DigestFieldsInfo = NULL;
}
authdigest_initialised = 0;
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;
}
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;