nghttpx: Use ImmutableString for request_header_file and response_header_file
This commit is contained in:
parent
67804cfc8c
commit
9055323b67
|
@ -1986,8 +1986,8 @@ void process_options(
|
||||||
{
|
{
|
||||||
auto &dumpconf = http2conf.upstream.debug.dump;
|
auto &dumpconf = http2conf.upstream.debug.dump;
|
||||||
|
|
||||||
if (dumpconf.request_header_file) {
|
if (!dumpconf.request_header_file.empty()) {
|
||||||
auto path = dumpconf.request_header_file.get();
|
auto path = dumpconf.request_header_file.c_str();
|
||||||
auto f = open_file_for_write(path);
|
auto f = open_file_for_write(path);
|
||||||
|
|
||||||
if (f == nullptr) {
|
if (f == nullptr) {
|
||||||
|
@ -2007,8 +2007,8 @@ void process_options(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dumpconf.response_header_file) {
|
if (!dumpconf.response_header_file.empty()) {
|
||||||
auto path = dumpconf.response_header_file.get();
|
auto path = dumpconf.response_header_file.c_str();
|
||||||
auto f = open_file_for_write(path);
|
auto f = open_file_for_write(path);
|
||||||
|
|
||||||
if (f == nullptr) {
|
if (f == nullptr) {
|
||||||
|
|
|
@ -1919,13 +1919,11 @@ int parse_config(const char *opt, const char *optarg,
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
case SHRPX_OPTID_FRONTEND_HTTP2_DUMP_REQUEST_HEADER:
|
case SHRPX_OPTID_FRONTEND_HTTP2_DUMP_REQUEST_HEADER:
|
||||||
mod_config()->http2.upstream.debug.dump.request_header_file =
|
mod_config()->http2.upstream.debug.dump.request_header_file = optarg;
|
||||||
strcopy(optarg);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
case SHRPX_OPTID_FRONTEND_HTTP2_DUMP_RESPONSE_HEADER:
|
case SHRPX_OPTID_FRONTEND_HTTP2_DUMP_RESPONSE_HEADER:
|
||||||
mod_config()->http2.upstream.debug.dump.response_header_file =
|
mod_config()->http2.upstream.debug.dump.response_header_file = optarg;
|
||||||
strcopy(optarg);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
case SHRPX_OPTID_HTTP2_NO_COOKIE_CRUMBLING:
|
case SHRPX_OPTID_HTTP2_NO_COOKIE_CRUMBLING:
|
||||||
|
|
|
@ -473,8 +473,8 @@ struct Http2Config {
|
||||||
struct {
|
struct {
|
||||||
struct {
|
struct {
|
||||||
struct {
|
struct {
|
||||||
std::unique_ptr<char[]> request_header_file;
|
ImmutableString request_header_file;
|
||||||
std::unique_ptr<char[]> response_header_file;
|
ImmutableString response_header_file;
|
||||||
FILE *request_header;
|
FILE *request_header;
|
||||||
FILE *response_header;
|
FILE *response_header;
|
||||||
} dump;
|
} dump;
|
||||||
|
|
Loading…
Reference in New Issue