aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-07-31 07:36:01 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-07-31 07:36:01 +0000
commit81c48aa43d5c8b4f73d438f8b1ec83d4fa7db8b5 (patch)
tree0bc7b5e59b5314f954fa4af3778cfd3679208b72 /lib
parent0cfa9b52ae28b252acf7b9ca5a374ad4dbdab864 (diff)
Joel Chen reported that we assumed content within quotes a bit too much in
the digest code. This fixes it.
Diffstat (limited to 'lib')
-rw-r--r--lib/http_digest.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/http_digest.c b/lib/http_digest.c
index d06453e8a..cd224625c 100644
--- a/lib/http_digest.c
+++ b/lib/http_digest.c
@@ -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;
}
@@ -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 */