mirror of
https://github.com/curl/curl.git
synced 2026-08-24 15:23:36 +03:00
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)
This commit is contained in:
parent
f689d06ca9
commit
606562aa7e
6 changed files with 160 additions and 98 deletions
15
lib/url.c
15
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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue