aboutsummaryrefslogtreecommitdiff
path: root/lib/cookie.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2015-04-01 23:25:29 +0200
committerDaniel Stenberg <daniel@haxx.se>2015-04-01 23:25:29 +0200
commit2685041a5c285968696de639699fb39a0fdf8c69 (patch)
tree71726626430e27496574ac25c709bb19bd4cdee6 /lib/cookie.c
parentb121633402b3ee8a370d456b2f0ddeb546024a70 (diff)
cookie: handle spaces after the name in Set-Cookie
"name =value" is fine and the space should just be skipped. Updated test 31 to also test for this. Bug: https://github.com/bagder/curl/issues/195 Reported-by: cromestant Help-by: Frank Gevaerts
Diffstat (limited to 'lib/cookie.c')
-rw-r--r--lib/cookie.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/cookie.c b/lib/cookie.c
index f1450e905..0864f6bcf 100644
--- a/lib/cookie.c
+++ b/lib/cookie.c
@@ -407,7 +407,7 @@ Curl_cookie_add(struct SessionHandle *data,
do {
/* we have a <what>=<this> pair or a stand-alone word here */
name[0]=what[0]=0; /* init the buffers */
- if(1 <= sscanf(ptr, "%" MAX_NAME_TXT "[^;\r\n =]=%"
+ if(1 <= sscanf(ptr, "%" MAX_NAME_TXT "[^;\r\n =] =%"
MAX_COOKIE_LINE_TXT "[^;\r\n]",
name, what)) {
/* Use strstore() below to properly deal with received cookie