nghttp: Sort request header fields using http2::name_less

This commit is contained in:
Tatsuhiro Tsujikawa 2014-08-08 00:27:04 +09:00
parent 05f982dcfb
commit 76b3ba2832
1 changed files with 1 additions and 5 deletions

View File

@ -1043,11 +1043,7 @@ int submit_request
build_headers.emplace_back(kv.first, kv.second, no_index); 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, http2::name_less);
const Headers::value_type& rhs)
{
return lhs.name < rhs.name;
});
auto nva = std::vector<nghttp2_nv>(); auto nva = std::vector<nghttp2_nv>();
nva.reserve(build_headers.size()); nva.reserve(build_headers.size());