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

Unified Diff: Source/core/fetch/Resource.cpp

Issue 961773002: Add a comma delimited syntax parser and use it for Accept-CH (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added layout test Created 5 years, 10 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
« no previous file with comments | « LayoutTests/http/tests/misc/client-hints-invalid-accept.php ('k') | Source/platform/network/HTTPParsers.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/Resource.cpp
diff --git a/Source/core/fetch/Resource.cpp b/Source/core/fetch/Resource.cpp
index e7025397a44cebfef585efe994ab88260702c160..d7628199c448966a8d98ebe460c45cc896dea394 100644
--- a/Source/core/fetch/Resource.cpp
+++ b/Source/core/fetch/Resource.cpp
@@ -445,8 +445,8 @@ void Resource::responseReceived(const ResourceResponse& response, PassOwnPtr<Web
if (fetcher && fetcher->frame()) {
LinkLoader::loadLinkFromHeader(response.httpHeaderField("Link"), fetcher->frame()->document());
if (RuntimeEnabledFeatures::clientHintsEnabled() && type() == Resource::MainResource) {
- String acceptCH = response.httpHeaderField("accept-ch").lower();
- // FIXME: Write an actual parser for this comma delimited header. crbug.com/461741
+ CommaDelimitedHeaderSet acceptCH;
+ parseCommaDelimitedHeader(response.httpHeaderField("accept-ch"), acceptCH);
if (acceptCH.contains("dpr"))
fetcher->frame()->setShouldSendDPRHint();
if (acceptCH.contains("rw"))
« no previous file with comments | « LayoutTests/http/tests/misc/client-hints-invalid-accept.php ('k') | Source/platform/network/HTTPParsers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698