Index: Source/modules/fetch/FetchHeaderList.cpp |
diff --git a/Source/modules/fetch/FetchHeaderList.cpp b/Source/modules/fetch/FetchHeaderList.cpp |
index a03e9f3e3d39d1b679f12d5ba463588338253050..c1a2f1c19cbaed24e36a19bad5b3d6db313cef6e 100644 |
--- a/Source/modules/fetch/FetchHeaderList.cpp |
+++ b/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 |