aboutsummaryrefslogtreecommitdiff
path: root/lib/cookie.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cookie.c')
-rw-r--r--lib/cookie.c9
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 */