]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cookiejar now enables the cookie engine
authorDaniel Stenberg <daniel@haxx.se>
Wed, 10 Oct 2001 12:48:32 +0000 (12:48 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 10 Oct 2001 12:48:32 +0000 (12:48 +0000)
lib/cookie.c
lib/url.c

index 551dd1489299d66d52e066ff0ae6cd37ed940dca..12e4074c283485083f5cc9452a7fc1815a92b037 100644 (file)
@@ -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;
   }
index a9f12d6703679e3e187f5e71661dfa7a5223e727..dd44b3864cbf3dcfb16241635709c4a5fab99a6b 100644 (file)
--- 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:
     /*