nghttpd: Use raw-string literal to output help

This commit is contained in:
Tatsuhiro Tsujikawa 2014-03-22 21:24:21 +09:00
parent dbb82b0f9c
commit e4dacb2f6f
1 changed files with 42 additions and 44 deletions

View File

@ -93,50 +93,48 @@ namespace {
void print_help(std::ostream& out) void print_help(std::ostream& out)
{ {
print_usage(out); print_usage(out);
out << "\n" out << R"(
<< " <PORT> Specify listening port number.\n" <PORT> Specify listening port number.
<< " <PRIVATE_KEY> Set path to server's private key. Required\n" <PRIVATE_KEY> Set path to server's private key. Required
<< " unless --no-tls is specified.\n" unless --no-tls is specified.
<< " <CERT> Set path to server's certificate. Required\n" <CERT> Set path to server's certificate. Required
<< " unless --no-tls is specified.\n" unless --no-tls is specified.
<< "\n" Options:
<< "Options:\n" -D, --daemon Run in a background. If -D is used, the current
<< " -D, --daemon Run in a background. If -D is used, the\n" working directory is changed to '/'. Therefore
<< " current working directory is changed to '/'.\n" if this option is used, -d option must be
<< " Therefore if this option is used, -d option\n" specified.
<< " must be specified.\n" -V, --verify-client
<< " -V, --verify-client\n" The server sends a client certificate request.
<< " The server sends a client certificate\n" If the client did not return a certificate, the
<< " request. If the client did not return a\n" handshake is terminated. Currently, this option
<< " certificate, the handshake is terminated.\n" just requests a client certificate and does not
<< " Currently, this option just requests a\n" verify it.
<< " client certificate and does not verify it.\n" -d, --htdocs=<PATH>
<< " -d, --htdocs=<PATH>\n" Specify document root. If this option is not
<< " Specify document root. If this option is\n" specified, the document root is the current
<< " not specified, the document root is the\n" working directory.
<< " current working directory.\n" -v, --verbose Print debug information such as reception/
<< " -v, --verbose Print debug information such as reception/\n" transmission of frames and name/value pairs.
<< " transmission of frames and name/value pairs.\n" --no-tls Disable SSL/TLS.
<< " --no-tls Disable SSL/TLS.\n" -c, --header-table-size=<N>
<< " -c, --header-table-size=<N>\n" Specify decoder header table size.
<< " Specify decoder header table size.\n" --color Force colored log output.
<< " --color Force colored log output.\n" -p, --push=<PATH>=<PUSH_PATH,...>
<< " -p, --push=<PATH>=<PUSH_PATH,...>\n" Push resources <PUSH_PATH>s when <PATH> is
<< " Push resources PUSH_PATHs when PATH is\n" requested. This option can be used repeatedly to
<< " requested. This option can be used\n" specify multiple push configurations. <PATH> and
<< " repeatedly to specify multiple push\n" <PUSH_PATH>s are relative to document root. See
<< " configurations. For example,\n" --htdocs option. Example: -p/=/foo.png
<< " -p/=/foo.png -p/doc=/bar.css\n" -p/doc=/bar.css
<< " PATH and PUSH_PATHs are relative to document\n" -b, --padding=<N> Add at most <N> bytes to a frame payload as
<< " root. See --htdocs option.\n" padding. Specify 0 to disable padding.
<< " -b, --padding=<N> Add at most <N> bytes to a frame payload as\n" -n, --workers=<CORE>
<< " padding. Specify 0 to disable padding.\n" Set the number of worker threads.
<< " -n, --workers=<CORE>\n" Default: 1
<< " Set the number of worker threads.\n" -e, --error-gzip Make error response gzipped.
<< " Default: 1\n" --version Display version information and exit.
<< " -e, --error-gzip Make error response gzipped.\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