diff options
author | Daniel Stenberg <daniel@haxx.se> | 2006-05-24 22:46:38 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2006-05-24 22:46:38 +0000 |
commit | 606562aa7ea28ee0fdd5bf2cd6febada9594ad19 (patch) | |
tree | 751a53ebc9700f6bde77d0cbce1b6f23499c5940 /lib/url.c | |
parent | f689d06ca91b772c56440101e578dca21fab4daa (diff) |
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)
Diffstat (limited to 'lib/url.c')
-rw-r--r-- | lib/url.c | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -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; |