From 606562aa7ea28ee0fdd5bf2cd6febada9594ad19 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 24 May 2006 22:46:38 +0000 Subject: Michael Wallner provided a patch that allows "SESS" to be set with CURLOPT_COOKIELIST, which then makes all session cookies get cleared. (slightly edited by me, and the re-indent in cookie.c was also done by me) --- lib/url.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'lib/url.c') diff --git a/lib/url.c b/lib/url.c index 690b3f302..e9fa81168 100644 --- a/lib/url.c +++ b/lib/url.c @@ -829,12 +829,13 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, break; if(strequal(argptr, "ALL")) { - if(data->cookies) { - /* clear all cookies */ - Curl_cookie_freelist(data->cookies->cookies); - data->cookies->cookies = NULL; - data->cookies->numcookies = 0; - } + /* clear all cookies */ + Curl_cookie_clearall(data->cookies); + break; + } + else if(strequal(argptr, "SESS")) { + /* clear session cookies */ + Curl_cookie_clearsess(data->cookies); break; } @@ -2299,7 +2300,7 @@ static CURLcode ConnectPlease(struct connectdata *conn, break; case CURLPROXY_SOCKS4: return handleSock4Proxy(conn->proxyuser, conn) ? - CURLE_COULDNT_CONNECT : CURLE_OK; + CURLE_COULDNT_CONNECT : CURLE_OK; default: failf(conn->data, "unknown proxytype option given"); return CURLE_COULDNT_CONNECT; -- cgit v1.2.3