diff options
author | Daniel Stenberg <daniel@haxx.se> | 2006-09-11 17:18:18 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2006-09-11 17:18:18 +0000 |
commit | 29dc39fce1126265d8526be15beec3e3fdc1c11d (patch) | |
tree | fcedacc94aca54103fc19c03d0c114e997ee97c2 /lib/sslgen.c | |
parent | 5c184cfc0d71a928b28ace2778bbe5064917f4da (diff) |
- Fixed my breakage from earlier today so that doing curl_easy_cleanup() on a
handle that is part of a multi handle first removes the handle from the
stack.
- Added CURLOPT_SSL_SESSIONID_CACHE and --no-sessionid to disable SSL
session-ID re-use on demand since there obviously are broken servers out
there that misbehave with session-IDs used.
Diffstat (limited to 'lib/sslgen.c')
-rw-r--r-- | lib/sslgen.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/sslgen.c b/lib/sslgen.c index 641131571..fec358c51 100644 --- a/lib/sslgen.c +++ b/lib/sslgen.c @@ -246,6 +246,10 @@ int Curl_ssl_getsessionid(struct connectdata *conn, struct SessionHandle *data = conn->data; long i; + if(!conn->ssl_config.sessionid) + /* session ID re-use is disabled */ + return TRUE; + for(i=0; i< data->set.ssl.numsessions; i++) { check = &data->state.session[i]; if(!check->sessionid) @@ -311,6 +315,10 @@ CURLcode Curl_ssl_addsessionid(struct connectdata *conn, long oldest_age=data->state.session[0].age; /* zero if unused */ char *clone_host; + /* Even though session ID re-use might be disabled, that only disables USING + IT. We still store it here in case the re-using is again enabled for an + upcoming transfer */ + clone_host = strdup(conn->host.name); if(!clone_host) return CURLE_OUT_OF_MEMORY; /* bail out */ |