From 6f752c64bc18a9fdd0c0b2321faa230781280b8b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 4 Mar 2005 00:26:50 +0000 Subject: 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. --- lib/cookie.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') 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; -- cgit v1.2.3