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

Unified Diff: Source/core/loader/LinkHeader.cpp

Issue 1322543003: Fix Link header parsing bug with extension parameter parsing. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Better comments Created 5 years, 4 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 | « Source/core/loader/LinkHeader.h ('k') | Source/core/loader/LinkHeaderTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/LinkHeader.cpp
diff --git a/Source/core/loader/LinkHeader.cpp b/Source/core/loader/LinkHeader.cpp
index e9adad68e923b3ac3f845d7737d073365f95aa23..163bf58bb04a1479990f95a5e07ea1ebd31e04a3 100644
--- a/Source/core/loader/LinkHeader.cpp
+++ b/Source/core/loader/LinkHeader.cpp
@@ -25,7 +25,7 @@ static bool isValidURLChar(CharType chr)
template <typename CharType>
static bool isValidParameterNameChar(CharType chr)
{
- return !isWhitespace(chr) && chr != '=';
+ return !isWhitespace(chr) && chr != '=' && chr != ';' && chr != ',';
Nate Chapin 2015/08/27 21:39:16 Is there a spec for this?
}
template <typename CharType>
@@ -40,6 +40,7 @@ static bool isValidParameterValueChar(CharType chr)
return !isWhitespace(chr) && !isValidParameterValueEnd(chr);
}
+// Verify that the parameter is a link-extension which according to spec doesn't have to have a value.
static bool isExtensionParameter(LinkHeader::LinkParameterName name)
{
return name > LinkHeader::LinkParameterAnchor;
« no previous file with comments | « Source/core/loader/LinkHeader.h ('k') | Source/core/loader/LinkHeaderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698