[Cache API] Optimize whitespace trimming in Vary header values
[WebKit-https.git] / Source / WebCore / Modules / cache / Cache.cpp
index 3781d430b453be2b4ea5bce25ba303bd7e76a5ce..d642314c23b219ea2990f63382933378676e9b82 100644 (file)
@@ -127,7 +127,7 @@ static inline bool hasResponseVaryStarHeaderValue(const FetchResponse& response)
     auto varyValue = response.headers().internalHeaders().get(WebCore::HTTPHeaderName::Vary);
     bool hasStar = false;
     varyValue.split(',', false, [&](StringView view) {
-        if (!hasStar && stripLeadingAndTrailingHTTPSpaces(view.toStringWithoutCopying()) == "*")
+        if (!hasStar && stripLeadingAndTrailingHTTPSpaces(view) == "*")
             hasStar = true;
     });
     return hasStar;