nghttp: Use raw-literal string for help output
This commit is contained in:
parent
136d997596
commit
7ffa594d4c
110
src/nghttp.cc
110
src/nghttp.cc
|
@ -1636,8 +1636,8 @@ void print_version(std::ostream& out)
|
||||||
namespace {
|
namespace {
|
||||||
void print_usage(std::ostream& out)
|
void print_usage(std::ostream& out)
|
||||||
{
|
{
|
||||||
out << "Usage: nghttp [OPTIONS]... <URI>...\n"
|
out << R"(Usage: nghttp [OPTIONS]... <URI>...
|
||||||
<< "HTTP/2 experimental client" << std::endl;
|
HTTP/2 experimental client)" << std::endl;
|
||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
@ -1645,60 +1645,58 @@ namespace {
|
||||||
void print_help(std::ostream& out)
|
void print_help(std::ostream& out)
|
||||||
{
|
{
|
||||||
print_usage(out);
|
print_usage(out);
|
||||||
out << "\n"
|
out << R"(
|
||||||
<< " <URI> Specify URI to access.\n"
|
<URI> Specify URI to access.
|
||||||
<< "Options:\n"
|
Options:
|
||||||
<< " -v, --verbose Print debug information such as reception/\n"
|
-v, --verbose Print debug information such as reception and
|
||||||
<< " transmission of frames and name/value pairs.\n"
|
transmission of frames and name/value pairs.
|
||||||
<< " -n, --null-out Discard downloaded data.\n"
|
-n, --null-out Discard downloaded data.
|
||||||
<< " -O, --remote-name Save download data in the current directory.\n"
|
-O, --remote-name Save download data in the current directory. The
|
||||||
<< " The filename is dereived from URI. If URI\n"
|
filename is dereived from URI. If URI ends with
|
||||||
<< " ends with '/', 'index.html' is used as a\n"
|
'/', 'index.html' is used as a filename. Not
|
||||||
<< " filename. Not implemented yet.\n"
|
implemented yet.
|
||||||
<< " -t, --timeout=<N> Timeout each request after <N> seconds.\n"
|
-t, --timeout=<N> Timeout each request after <N> seconds.
|
||||||
<< " -w, --window-bits=<N>\n"
|
-w, --window-bits=<N>
|
||||||
<< " Sets the stream level initial window size\n"
|
Sets the stream level initial window size to
|
||||||
<< " to 2**<N>-1.\n"
|
2**<N>-1.
|
||||||
<< " -W, --connection-window-bits=<N>\n"
|
-W, --connection-window-bits=<N>
|
||||||
<< " Sets the connection level initial window\n"
|
Sets the connection level initial window size to
|
||||||
<< " size to 2**<N>-1.\n"
|
2**<N>-1.
|
||||||
<< " -a, --get-assets Download assets such as stylesheets, images\n"
|
-a, --get-assets Download assets such as stylesheets, images and
|
||||||
<< " and script files linked from the downloaded\n"
|
script files linked from the downloaded resource.
|
||||||
<< " resource. Only links whose origins are the\n"
|
Only links whose origins are the same with the
|
||||||
<< " same with the linking resource will be\n"
|
linking resource will be downloaded.
|
||||||
<< " downloaded.\n"
|
-s, --stat Print statistics.
|
||||||
<< " -s, --stat Print statistics.\n"
|
-H, --header Add a header to the requests.
|
||||||
<< " -H, --header Add a header to the requests.\n"
|
--cert=<CERT> Use the specified client certificate file. The
|
||||||
<< " --cert=<CERT> Use the specified client certificate file.\n"
|
file must be in PEM format.
|
||||||
<< " The file must be in PEM format.\n"
|
--key=<KEY> Use the client private key file. The file must
|
||||||
<< " --key=<KEY> Use the client private key file. The file\n"
|
be in PEM format.
|
||||||
<< " must be in PEM format.\n"
|
-d, --data=<FILE> Post FILE to server. If '-' is given, data will
|
||||||
<< " -d, --data=<FILE> Post FILE to server. If - is given, data\n"
|
be read from stdin.
|
||||||
<< " will be read from stdin.\n"
|
-m, --multiply=<N> Request each URI <N> times. By default, same URI
|
||||||
<< " -m, --multiply=<N> Request each URI <N> times. By default, same\n"
|
is not requested twice. This option disables it
|
||||||
<< " URI is not requested twice. This option\n"
|
too.
|
||||||
<< " disables it too.\n"
|
-u, --upgrade Perform HTTP Upgrade for HTTP/2.0. This option
|
||||||
<< " -u, --upgrade Perform HTTP Upgrade for HTTP/2.0. This\n"
|
is ignored if the request URI has https scheme.
|
||||||
<< " option is ignored if the request URI has\n"
|
If -d is used, the HTTP upgrade request is
|
||||||
<< " https scheme.\n"
|
performed with OPTIONS method.
|
||||||
<< " If -d is used, the HTTP upgrade request is\n"
|
-p, --pri=<PRIORITY>
|
||||||
<< " performed with OPTIONS method.\n"
|
Sets stream priority. Default: )"
|
||||||
<< " -p, --pri=<PRIORITY>\n"
|
<< NGHTTP2_PRI_DEFAULT << R"(
|
||||||
<< " Sets stream priority. Default: "
|
-M, --peer-max-concurrent-streams=<N>
|
||||||
<< NGHTTP2_PRI_DEFAULT << "\n"
|
Use <N> as SETTINGS_MAX_CONCURRENT_STREAMS value
|
||||||
<< " -M, --peer-max-concurrent-streams=<N>\n"
|
of remote endpoint as if it is received in
|
||||||
<< " Use <N> as SETTINGS_MAX_CONCURRENT_STREAMS\n"
|
SETTINGS frame. The default is large enough as
|
||||||
<< " value of remote endpoint as if it is\n"
|
it is seen as unlimited.
|
||||||
<< " received in SETTINGS frame. The default\n"
|
-c, --header-table-size=<N>
|
||||||
<< " is large enough as it is seen as unlimited.\n"
|
Specify decoder header table size.
|
||||||
<< " -c, --header-table-size=<N>\n"
|
-b, --padding=<N> Add at most <N> bytes to a frame payload as
|
||||||
<< " Specify decoder header table size.\n"
|
padding. Specify 0 to disable padding.
|
||||||
<< " -b, --padding=<N> Add at most <N> bytes to a frame payload as\n"
|
--color Force colored log output.
|
||||||
<< " padding. Specify 0 to disable padding.\n"
|
--continuation Send large header to test CONTINUATION.
|
||||||
<< " --color Force colored log output.\n"
|
--version Display version information and exit.
|
||||||
<< " --continuation Send large header to test CONTINUATION.\n"
|
-h, --help Display this help and exit.)"
|
||||||
<< " --version Display version information and exit.\n"
|
|
||||||
<< " -h, --help Display this help and exit.\n"
|
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
Loading…
Reference in New Issue