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;
|
||||
|
||||
if (dumpconf.request_header_file) {
|
||||
auto path = dumpconf.request_header_file.get();
|
||||
if (!dumpconf.request_header_file.empty()) {
|
||||
auto path = dumpconf.request_header_file.c_str();
|
||||
auto f = open_file_for_write(path);
|
||||
|
||||
if (f == nullptr) {
|
||||
|
@ -2007,8 +2007,8 @@ void process_options(
|
|||
}
|
||||
}
|
||||
|
||||
if (dumpconf.response_header_file) {
|
||||
auto path = dumpconf.response_header_file.get();
|
||||
if (!dumpconf.response_header_file.empty()) {
|
||||
auto path = dumpconf.response_header_file.c_str();
|
||||
auto f = open_file_for_write(path);
|
||||
|
||||
if (f == nullptr) {
|
||||
|
|
|
@ -1919,13 +1919,11 @@ int parse_config(const char *opt, const char *optarg,
|
|||
|
||||
return 0;
|
||||
case SHRPX_OPTID_FRONTEND_HTTP2_DUMP_REQUEST_HEADER:
|
||||
mod_config()->http2.upstream.debug.dump.request_header_file =
|
||||
strcopy(optarg);
|
||||
mod_config()->http2.upstream.debug.dump.request_header_file = optarg;
|
||||
|
||||
return 0;
|
||||
case SHRPX_OPTID_FRONTEND_HTTP2_DUMP_RESPONSE_HEADER:
|
||||
mod_config()->http2.upstream.debug.dump.response_header_file =
|
||||
strcopy(optarg);
|
||||
mod_config()->http2.upstream.debug.dump.response_header_file = optarg;
|
||||
|
||||
return 0;
|
||||
case SHRPX_OPTID_HTTP2_NO_COOKIE_CRUMBLING:
|
||||
|
|
|
@ -473,8 +473,8 @@ struct Http2Config {
|
|||
struct {
|
||||
struct {
|
||||
struct {
|
||||
std::unique_ptr<char[]> request_header_file;
|
||||
std::unique_ptr<char[]> response_header_file;
|
||||
ImmutableString request_header_file;
|
||||
ImmutableString response_header_file;
|
||||
FILE *request_header;
|
||||
FILE *response_header;
|
||||
} dump;
|
||||
|
|
Loading…
Reference in New Issue