diff options
| author | Daniel Stenberg <daniel@haxx.se> | 2002-07-29 22:22:49 +0000 | 
|---|---|---|
| committer | Daniel Stenberg <daniel@haxx.se> | 2002-07-29 22:22:49 +0000 | 
| commit | d8b2c819e7b96d1fed4bd9921a200899bde80034 (patch) | |
| tree | fbc1bdf84d95cb1ee0429ff05c3846fb3d74f15f /lib | |
| parent | 69f6d14b810b46209fd32641b0b6b42430abdb5b (diff) | |
properly skip white spaces on Set-Cookie: header lines
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/cookie.c | 6 | 
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/cookie.c b/lib/cookie.c index e7628a9b3..81425413f 100644 --- a/lib/cookie.c +++ b/lib/cookie.c @@ -121,7 +121,7 @@ free_cookiemess(struct Cookie *co)  struct Cookie *  Curl_cookie_add(struct CookieInfo *c,                  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 */  {    struct Cookie *clist; @@ -146,6 +146,10 @@ Curl_cookie_add(struct CookieInfo *c,      /* This line was read off a HTTP-header */      char *sep;      semiptr=strchr(lineptr, ';'); /* first, find a semicolon */ + +    while(*lineptr && isspace((int)*lineptr)) +      lineptr++; +      ptr = lineptr;      do {        /* we have a <what>=<this> pair or a 'secure' word here */  | 
