From 29dc39fce1126265d8526be15beec3e3fdc1c11d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 11 Sep 2006 17:18:18 +0000 Subject: - 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. --- src/main.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/main.c b/src/main.c index f0d2fd4ee..6d4820268 100644 --- a/src/main.c +++ b/src/main.c @@ -358,6 +358,7 @@ struct Configurable { int ftp_filemethod; bool ignorecl; /* --ignore-content-length */ + bool disable_sessionid; }; #define WARN_PREFIX "Warning: " @@ -547,6 +548,7 @@ static void help(void) " --netrc-optional Use either .netrc or URL; overrides -n", " --ntlm Use HTTP NTLM authentication (H)", " -N/--no-buffer Disable buffering of the output stream", + " --no-sessionid Disable SSL session-ID reusing (SSL)", " -o/--output Write output to instead of stdout", " -O/--remote-name Write output to a file named as the remote file", " -p/--proxytunnel Operate through a HTTP proxy tunnel (using CONNECT)", @@ -1348,6 +1350,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */ {"$t", "socks4", TRUE}, {"$u", "ftp-alternative-to-user", TRUE}, {"$v", "ftp-ssl-reqd", FALSE}, + {"$w", "no-sessionid", FALSE}, {"0", "http1.0", FALSE}, {"1", "tlsv1", FALSE}, @@ -1790,6 +1793,9 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */ case 'v': /* --ftp-ssl-reqd */ config->ftp_ssl_reqd ^= TRUE; break; + case 'w': /* --no-sessionid */ + config->disable_sessionid ^= TRUE; + break; } break; case '#': /* --progress-bar */ @@ -4013,11 +4019,17 @@ operate(struct Configurable *config, int argc, char *argv[]) /* curl 7.15.2 */ if(config->localport) { curl_easy_setopt(curl, CURLOPT_LOCALPORT, config->localport); - curl_easy_setopt(curl, CURLOPT_LOCALPORTRANGE, config->localportrange); + curl_easy_setopt(curl, CURLOPT_LOCALPORTRANGE, + config->localportrange); } - /* curl x.xx.x */ - curl_easy_setopt(curl, CURLOPT_FTP_ALTERNATIVE_TO_USER, config->ftp_alternative_to_user); + /* curl 7.15.5 */ + curl_easy_setopt(curl, CURLOPT_FTP_ALTERNATIVE_TO_USER, + config->ftp_alternative_to_user); + + /* curl 7.16.0 */ + curl_easy_setopt(curl, CURLOPT_SSL_SESSIONID_CACHE, + !config->disable_sessionid); retry_numretries = config->req_retry; -- cgit v1.2.3