diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-03-04 00:26:50 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-03-04 00:26:50 +0000 |
commit | 6f752c64bc18a9fdd0c0b2321faa230781280b8b (patch) | |
tree | a4e6d3f33b2c48132531d035c0438651235724a5 /lib/cookie.c | |
parent | ccb7950c4ccb9641200994689661a75b4e11a457 (diff) |
Dave Dribin made it possible to set CURLOPT_COOKIEFILE to "" to activate
the cookie "engine" without having to provide an empty or non-existing file.
Diffstat (limited to 'lib/cookie.c')
-rw-r--r-- | lib/cookie.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/cookie.c b/lib/cookie.c index f6cfc29cf..009bb9809 100644 --- a/lib/cookie.c +++ b/lib/cookie.c @@ -651,6 +651,10 @@ struct CookieInfo *Curl_cookie_init(struct SessionHandle *data, fp = stdin; fromfile=FALSE; } + else if(file && !*file) { + /* points to a "" string */ + fp = NULL; + } else fp = file?fopen(file, "r"):NULL; |