| Index: Source/platform/network/HTTPParsers.cpp
|
| diff --git a/Source/platform/network/HTTPParsers.cpp b/Source/platform/network/HTTPParsers.cpp
|
| index 71ac44138112cc6e93430fe5327d71da43b2db2c..79406a0beca78d1d0d685373991be4fae7c18828 100644
|
| --- a/Source/platform/network/HTTPParsers.cpp
|
| +++ b/Source/platform/network/HTTPParsers.cpp
|
| @@ -44,6 +44,11 @@ using namespace WTF;
|
|
|
| namespace blink {
|
|
|
| +static bool isWhitespace(UChar chr)
|
| +{
|
| + return (chr == ' ') || (chr == '\t');
|
| +}
|
| +
|
| // true if there is more to parse, after incrementing pos past whitespace.
|
| // Note: Might return pos == str.length()
|
| static inline bool skipWhiteSpace(const String& str, unsigned& pos, bool fromHttpEquivMeta)
|
| @@ -54,7 +59,7 @@ static inline bool skipWhiteSpace(const String& str, unsigned& pos, bool fromHtt
|
| while (pos < len && str[pos] <= ' ')
|
| ++pos;
|
| } else {
|
| - while (pos < len && (str[pos] == '\t' || str[pos] == ' '))
|
| + while (pos < len && isWhitespace(str[pos]))
|
| ++pos;
|
| }
|
|
|
| @@ -851,4 +856,12 @@ CacheControlHeader parseCacheControlDirectives(const AtomicString& cacheControlV
|
| return cacheControlHeader;
|
| }
|
|
|
| +void parseCommaDelimitedHeader(const String& headerValue, CommaDelimitedHeaderSet& headerSet)
|
| +{
|
| + Vector<String> results;
|
| + headerValue.split(",", results);
|
| + for (auto& value : results)
|
| + headerSet.add(value.stripWhiteSpace(isWhitespace));
|
| +}
|
| +
|
| }
|
|
|