diff options
author | Daniel Stenberg <daniel@haxx.se> | 2000-05-22 14:12:12 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2000-05-22 14:12:12 +0000 |
commit | 96dde76b99897352aa3d0877a0b621a9e605733e (patch) | |
tree | 4fdab47b4c9769405aa799bf65971c31abf2de6b /lib/cookie.c | |
parent | fb9d1ff00f76836dd66725de869656c5fa53b071 (diff) |
moved here from the newlib branch
Diffstat (limited to 'lib/cookie.c')
-rw-r--r-- | lib/cookie.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/cookie.c b/lib/cookie.c index 00497bc94..8038dafe3 100644 --- a/lib/cookie.c +++ b/lib/cookie.c @@ -62,6 +62,7 @@ Example set of cookies: #include "cookie.h" #include "setup.h" #include "getdate.h" +#include "strequal.h" /**************************************************************************** * @@ -131,7 +132,7 @@ struct Cookie *cookie_add(struct CookieInfo *c, } else if(strequal("expires", name)) { co->expirestr=strdup(what); - co->expires = get_date(what, &now); + co->expires = curl_getdate(what, &now); } else if(!co->name) { co->name = strdup(name); @@ -173,9 +174,11 @@ struct Cookie *cookie_add(struct CookieInfo *c, return NULL; } /* strip off the possible end-of-line characters */ - if(ptr=strchr(lineptr, '\r')) + ptr=strchr(lineptr, '\r'); + if(ptr) *ptr=0; /* clear it */ - if(ptr=strchr(lineptr, '\n')) + ptr=strchr(lineptr, '\n'); + if(ptr) *ptr=0; /* clear it */ firstptr=strtok(lineptr, "\t"); /* first tokenize it on the TAB */ |