fix: Don't sort the headers of ClientRequest (#26134)

This commit is contained in:
LuoJinghua 2020-10-27 02:33:36 +08:00 committed by GitHub
parent 2d1bbd2e38
commit 0fc5f18b63
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 53 additions and 1 deletions

View file

@ -378,7 +378,7 @@ gin::Handle<SimpleURLLoaderWrapper> SimpleURLLoaderWrapper::Create(
opts.Get("referrer", &request->referrer);
bool credentials_specified =
opts.Get("credentials", &request->credentials_mode);
std::map<std::string, std::string> extra_headers;
std::vector<std::pair<std::string, std::string>> extra_headers;
if (opts.Get("extraHeaders", &extra_headers)) {
for (const auto& it : extra_headers) {
if (!net::HttpUtil::IsValidHeaderName(it.first) ||