aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-09-11 17:18:18 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-09-11 17:18:18 +0000
commit29dc39fce1126265d8526be15beec3e3fdc1c11d (patch)
treefcedacc94aca54103fc19c03d0c114e997ee97c2 /src/main.c
parent5c184cfc0d71a928b28ace2778bbe5064917f4da (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 'src/main.c')
-rw-r--r--src/main.c18
1 files changed, 15 insertions, 3 deletions
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 <file> Write output to <file> 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;