mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
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.
This commit is contained in:
parent
2182e37433
commit
87037136ef
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user