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

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

Issue 2787003002: Fetch API: Stop lowercasing header names. (Closed)
Patch Set: Fix failing tests Created 3 years, 9 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 37ad99a8621ae4bf4cc5cddb74b97db9a3f11748..f32d4c9efc7d5be8eb28494bed2c62e2328c176c 100644
--- a/third_party/WebKit/Source/modules/fetch/FetchManager.cpp
+++ b/third_party/WebKit/Source/modules/fetch/FetchManager.cpp
@@ -726,11 +726,9 @@ void FetchManager::Loader::performHTTPFetch(bool corsFlag,
request.setHTTPMethod(m_request->method());
request.setFetchRequestMode(m_request->mode());
request.setFetchCredentialsMode(m_request->credentials());
- const Vector<std::unique_ptr<FetchHeaderList::Header>>& list =
- m_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 : m_request->headerList()->list()) {
+ request.addHTTPHeaderField(AtomicString(header.first),
+ AtomicString(header.second));
}
if (m_request->method() != HTTPNames::GET &&

Powered by Google App Engine
This is Rietveld 408576698