Index: third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp |
diff --git a/third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp b/third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp |
index a03e9f3e3d39d1b679f12d5ba463588338253050..4394b74c596bf5d9a7ad24ff2012df50943ebffc 100644 |
--- a/third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp |
+++ b/third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp |
@@ -149,11 +149,13 @@ bool FetchHeaderList::isValidHeaderName(const String& name) |
return isValidHTTPToken(name); |
} |
-bool FetchHeaderList::isValidHeaderValue(const String& value) |
+bool FetchHeaderList::isValidHeaderValueRFC7230(const String& value) |
{ |
- // "A value is a byte sequence that matches the field-value token production |
- // and contains no 0x0A or 0x0D bytes." |
- return isValidHTTPHeaderValue(value); |
+ // Checks the header value according to the latest Fetch API's header |
+ // value definition (https://fetch.spec.whatwg.org/#concept-header-value) and RFC |
+ // 7230 and it is different from isValidHTTPHeaderValue(). |
+ |
+ return value.isEmpty() || isValidHTTPFieldContentRFC7230(value); |
} |
} // namespace blink |