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

Unified Diff: third_party/WebKit/Source/modules/cachestorage/Cache.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/cachestorage/Cache.cpp
diff --git a/third_party/WebKit/Source/modules/cachestorage/Cache.cpp b/third_party/WebKit/Source/modules/cachestorage/Cache.cpp
index 2c89c8a3f81507533e3dfee6e60354d80f4347f7..6250d8c40d14121b0603b2181d1e9447e8beb973 100644
--- a/third_party/WebKit/Source/modules/cachestorage/Cache.cpp
+++ b/third_party/WebKit/Source/modules/cachestorage/Cache.cpp
@@ -205,9 +205,8 @@ void RecordResponseTypeForAdd(const Member<Response>& response) {
bool varyHeaderContainsAsterisk(const Response* response) {
const FetchHeaderList* headers = response->headers()->headerList();
- for (size_t i = 0; i < headers->size(); ++i) {
- const FetchHeaderList::Header& header = headers->entry(i);
- if (header.first == "vary") {
+ for (const auto& header : headers->list()) {
+ if (equalIgnoringCase(header.first, "vary")) {
haraken 2017/03/31 00:06:28 Should we probably use equalIgnoringASCIICase inst
Raphael Kubo da Costa (rakuco) 2017/03/31 10:22:21 Sure. I've done that in patch v3. This actually r
Vector<String> fields;
header.second.split(',', fields);
for (size_t j = 0; j < fields.size(); ++j) {
« no previous file with comments | « third_party/WebKit/Source/modules/BUILD.gn ('k') | third_party/WebKit/Source/modules/fetch/FetchHeaderList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698