aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-10-10 12:48:32 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-10-10 12:48:32 +0000
commitf2a25966cf7d18070a7f0e7a61379c3a6e7605b5 (patch)
treefc84511f6c25312324f960fc85e4bb9e4df4762a /lib
parent51afc3d8c5b566ac91142967308f0f69dad10f16 (diff)
cookiejar now enables the cookie engine
Diffstat (limited to 'lib')
-rw-r--r--lib/cookie.c2
-rw-r--r--lib/url.c8
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/cookie.c b/lib/cookie.c
index 551dd1489..12e4074c2 100644
--- a/lib/cookie.c
+++ b/lib/cookie.c
@@ -423,7 +423,7 @@ struct CookieInfo *Curl_cookie_init(char *file, struct CookieInfo *inc)
}
c->running = FALSE; /* this is not running, this is init */
- if(strequal(file, "-")) {
+ if(file && strequal(file, "-")) {
fp = stdin;
fromfile=FALSE;
}
diff --git a/lib/url.c b/lib/url.c
index a9f12d670..dd44b3864 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -503,7 +503,13 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...)
/*
* Set cookie file name to dump all cookies to when we're done.
*/
- data->set.cookiejar = cookiefile = (char *)va_arg(param, void *);
+ data->set.cookiejar = (char *)va_arg(param, void *);
+
+ /*
+ * Activate the cookie parser. This may or may not already
+ * have been made.
+ */
+ data->cookies = Curl_cookie_init(NULL, data->cookies);
break;
case CURLOPT_WRITEHEADER:
/*