Fix extra-headers parsing in JSON config

This commit is contained in:
klzgrad 2020-06-20 14:16:12 +08:00
parent e8e4f772a3
commit 8f5b1e4611

View File

@ -198,7 +198,7 @@ void GetCommandLineFromConfig(const base::FilePath& config_path,
if (concurrency) {
cmdline->concurrency = *concurrency;
}
const auto* extra_headers = value->FindStringKey("extra_headers");
const auto* extra_headers = value->FindStringKey("extra-headers");
if (extra_headers) {
cmdline->extra_headers = *extra_headers;
}
@ -304,6 +304,9 @@ bool ParseCommandLine(const CommandLine& cmdline, Params* params) {
}
params->extra_headers.AddHeadersFromString(cmdline.extra_headers);
if (!params->extra_headers.IsEmpty()) {
LOG(INFO) << "Using extra headers: " << params->extra_headers.ToString();
}
params->host_resolver_rules = cmdline.host_resolver_rules;