nghttp: Don't index authorization header field for debugging purpose
This commit is contained in:
parent
b1edb1f3ae
commit
1d38df0a31
|
@ -950,7 +950,11 @@ int submit_request
|
||||||
if(i < num_initial_headers) {
|
if(i < num_initial_headers) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
build_headers.emplace_back(kv.first, kv.second);
|
|
||||||
|
// To test "never index" repr, don't index authorization header
|
||||||
|
// field unconditionally.
|
||||||
|
auto no_index = util::strieq(kv.first, "authorization");
|
||||||
|
build_headers.emplace_back(kv.first, kv.second, no_index);
|
||||||
}
|
}
|
||||||
std::stable_sort(std::begin(build_headers), std::end(build_headers),
|
std::stable_sort(std::begin(build_headers), std::end(build_headers),
|
||||||
[](const Headers::value_type& lhs,
|
[](const Headers::value_type& lhs,
|
||||||
|
@ -965,7 +969,7 @@ int submit_request
|
||||||
nva.reserve(build_headers.size());
|
nva.reserve(build_headers.size());
|
||||||
|
|
||||||
for(auto& kv : build_headers) {
|
for(auto& kv : build_headers) {
|
||||||
nva.push_back(http2::make_nv(kv.name, kv.value, false));
|
nva.push_back(http2::make_nv(kv.name, kv.value, kv.no_index));
|
||||||
}
|
}
|
||||||
|
|
||||||
auto rv = nghttp2_submit_request(client->session, &req->pri_spec,
|
auto rv = nghttp2_submit_request(client->session, &req->pri_spec,
|
||||||
|
|
Loading…
Reference in New Issue