mirror of
https://github.com/moparisthebest/curl
synced 2025-03-11 07:39:50 -04:00
properly skip white spaces on Set-Cookie: header lines
This commit is contained in:
parent
69f6d14b81
commit
d8b2c819e7
@ -121,7 +121,7 @@ free_cookiemess(struct Cookie *co)
|
|||||||
struct Cookie *
|
struct Cookie *
|
||||||
Curl_cookie_add(struct CookieInfo *c,
|
Curl_cookie_add(struct CookieInfo *c,
|
||||||
bool httpheader, /* TRUE if HTTP header-style line */
|
bool httpheader, /* TRUE if HTTP header-style line */
|
||||||
char *lineptr, /* first non-space of the line */
|
char *lineptr, /* first character of the line */
|
||||||
char *domain) /* default domain */
|
char *domain) /* default domain */
|
||||||
{
|
{
|
||||||
struct Cookie *clist;
|
struct Cookie *clist;
|
||||||
@ -146,6 +146,10 @@ Curl_cookie_add(struct CookieInfo *c,
|
|||||||
/* This line was read off a HTTP-header */
|
/* This line was read off a HTTP-header */
|
||||||
char *sep;
|
char *sep;
|
||||||
semiptr=strchr(lineptr, ';'); /* first, find a semicolon */
|
semiptr=strchr(lineptr, ';'); /* first, find a semicolon */
|
||||||
|
|
||||||
|
while(*lineptr && isspace((int)*lineptr))
|
||||||
|
lineptr++;
|
||||||
|
|
||||||
ptr = lineptr;
|
ptr = lineptr;
|
||||||
do {
|
do {
|
||||||
/* we have a <what>=<this> pair or a 'secure' word here */
|
/* we have a <what>=<this> pair or a 'secure' word here */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user