Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(882)

Unified Diff: third_party/WebKit/Source/modules/fetch/FetchManager.cpp

Issue 2787003002: Fetch API: Stop lowercasing header names. (Closed)
Patch Set: Rebase for landing Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/fetch/FetchManager.cpp
diff --git a/third_party/WebKit/Source/modules/fetch/FetchManager.cpp b/third_party/WebKit/Source/modules/fetch/FetchManager.cpp
index f91e11fdfced67796fcb74a4d96b064b3b371cad..f0c2fdc5eeba40783928ee135d868b5152d39d8c 100644
--- a/third_party/WebKit/Source/modules/fetch/FetchManager.cpp
+++ b/third_party/WebKit/Source/modules/fetch/FetchManager.cpp
@@ -716,11 +716,9 @@ void FetchManager::Loader::PerformHTTPFetch(bool cors_flag,
request.SetHTTPMethod(request_->Method());
request.SetFetchRequestMode(request_->Mode());
request.SetFetchCredentialsMode(request_->Credentials());
- const Vector<std::unique_ptr<FetchHeaderList::Header>>& list =
- request_->HeaderList()->List();
- for (size_t i = 0; i < list.size(); ++i) {
- request.AddHTTPHeaderField(AtomicString(list[i]->first),
- AtomicString(list[i]->second));
+ for (const auto& header : request_->HeaderList()->List()) {
+ request.AddHTTPHeaderField(AtomicString(header.first),
+ AtomicString(header.second));
}
if (request_->Method() != HTTPNames::GET &&

Powered by Google App Engine
This is Rietveld 408576698