mirror of
https://github.com/curl/curl.git
synced 2026-08-25 17:43:39 +03:00
NPN/ALPN: allow disabling via command line
when using --http2 one can now selectively disable NPN or ALPN with --no-alpn and --no-npn. for now honored with NSS only. TODO: honor this option with GnuTLS and OpenSSL
This commit is contained in:
parent
70bd9784de
commit
909a68c121
11 changed files with 87 additions and 19 deletions
|
|
@ -90,7 +90,9 @@ static const struct LongShort aliases[]= {
|
|||
#endif
|
||||
{"*F", "dns-servers", TRUE},
|
||||
{"*g", "trace", TRUE},
|
||||
{"*G", "npn", FALSE},
|
||||
{"*h", "trace-ascii", TRUE},
|
||||
{"*H", "alpn", FALSE},
|
||||
{"*i", "limit-rate", TRUE},
|
||||
{"*j", "compressed", FALSE},
|
||||
{"*J", "tr-encoding", FALSE},
|
||||
|
|
@ -554,6 +556,9 @@ ParameterError getparameter(char *flag, /* f or -long-flag */
|
|||
warnf(config, "--trace overrides an earlier trace/verbose option\n");
|
||||
config->tracetype = TRACE_BIN;
|
||||
break;
|
||||
case 'G': /* --npn */
|
||||
config->nonpn = (!toggle)?TRUE:FALSE;
|
||||
break;
|
||||
case 'h': /* --trace-ascii */
|
||||
GetStr(&config->trace_dump, nextarg);
|
||||
if(config->tracetype && (config->tracetype != TRACE_ASCII))
|
||||
|
|
@ -561,6 +566,9 @@ ParameterError getparameter(char *flag, /* f or -long-flag */
|
|||
"--trace-ascii overrides an earlier trace/verbose option\n");
|
||||
config->tracetype = TRACE_ASCII;
|
||||
break;
|
||||
case 'H': /* --alpn */
|
||||
config->noalpn = (!toggle)?TRUE:FALSE;
|
||||
break;
|
||||
case 'i': /* --limit-rate */
|
||||
{
|
||||
/* We support G, M, K too */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue