Skip to content

Commit

Permalink
Joel Chen reported that we assumed content within quotes a bit too mu…
Browse files Browse the repository at this point in the history
…ch in

the digest code. This fixes it.
  • Loading branch information
bagder committed Jul 31, 2004
1 parent 0cfa9b5 commit 81c48aa
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/http_digest.c
Expand Up @@ -66,7 +66,7 @@ CURLdigest Curl_input_digest(struct connectdata *conn,
struct SessionHandle *data=conn->data;
bool before = FALSE; /* got a nonce before */
struct digestdata *d;

if(proxy) {
d = &data->state.proxydigest;
}
Expand Down Expand Up @@ -168,7 +168,12 @@ CURLdigest Curl_input_digest(struct connectdata *conn,
else {
/* unknown specifier, ignore it! */
}
totlen = strlen(value)+strlen(content)+3;
totlen = strlen(value)+strlen(content)+1;

if(header[strlen(value)+1] == '\"')
/* the contents were within quotes, then add 2 for them to the
length */
totlen += 2;
}
else
break; /* we're done here */
Expand Down

0 comments on commit 81c48aa

Please sign in to comment.