aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-01-07 23:05:36 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-01-07 23:05:36 +0000
commit87037136efd4d5eeefb7456c2ad14740a956e47d (patch)
tree8a99d963996e2dc7d2053966cdaa7efd3c374706 /lib
parent2182e374330f16ad7ed0179ef44d83699cd260eb (diff)
As identified in bug report #495290, the last "name=value" pair in a
Set-Cookie: line was ignored if they didn't end with a trailing semicolon. This is indeed wrong syntax, but there are high-profile web sites out there sending cookies like that so we must make a best-effort to parse them.
Diffstat (limited to 'lib')
-rw-r--r--lib/cookie.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/cookie.c b/lib/cookie.c
index 9ffdd2abe..8ba09832f 100644
--- a/lib/cookie.c
+++ b/lib/cookie.c
@@ -194,6 +194,11 @@ Curl_cookie_add(struct CookieInfo *c,
while(ptr && *ptr && isspace((int)*ptr))
ptr++;
semiptr=strchr(ptr, ';'); /* now, find the next semicolon */
+
+ if(!semiptr && *ptr)
+ /* There are no more semicolons, but there's a final name=value pair
+ coming up */
+ semiptr=ptr;
} while(semiptr);
if(NULL == co->domain)