h2load: Add --h1 option to force http/1.1 for both http and https URI

This commit is contained in:
Tatsuhiro Tsujikawa 2015-11-26 21:33:27 +09:00
parent 8e06e37375
commit bd041bcbb0
1 changed files with 9 additions and 0 deletions

View File

@ -1490,6 +1490,9 @@ Options:
only and any white spaces are treated as a part of only and any white spaces are treated as a part of
protocol string. protocol string.
Default: )" << DEFAULT_NPN_LIST << R"( Default: )" << DEFAULT_NPN_LIST << R"(
--h1 Short hand for --npn-list=http/1.1
--no-tls-proto=http/1.1, which effectively force
http/1.1 for both http and https URI.
-v, --verbose -v, --verbose
Output debug information. Output debug information.
--version Display version information and exit. --version Display version information and exit.
@ -1537,6 +1540,7 @@ int main(int argc, char **argv) {
{"base-uri", required_argument, nullptr, 'B'}, {"base-uri", required_argument, nullptr, 'B'},
{"npn-list", required_argument, &flag, 4}, {"npn-list", required_argument, &flag, 4},
{"rate-period", required_argument, &flag, 5}, {"rate-period", required_argument, &flag, 5},
{"h1", no_argument, &flag, 6},
{nullptr, 0, nullptr, 0}}; {nullptr, 0, nullptr, 0}};
int option_index = 0; int option_index = 0;
auto c = getopt_long(argc, argv, "hvW:c:d:m:n:p:t:w:H:i:r:T:N:B:", auto c = getopt_long(argc, argv, "hvW:c:d:m:n:p:t:w:H:i:r:T:N:B:",
@ -1703,6 +1707,11 @@ int main(int argc, char **argv) {
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
break; break;
case 6:
// --h1
config.npn_list = util::parse_config_str_list("http/1.1");
config.no_tls_proto = Config::PROTO_HTTP1_1;
break;
} }
break; break;
default: default: