Unreviewed, rolling out r239727.
[WebKit-https.git] / Source / WebCore / loader / CrossOriginPreflightResultCache.cpp
index 9d45b37..5d6e201 100644 (file)
@@ -54,11 +54,8 @@ static bool parseAccessControlMaxAge(const String& string, Seconds& expiryDelta)
 
 bool CrossOriginPreflightResultCacheItem::parse(const ResourceResponse& response)
 {
-    m_methods.clear();
-    parseAccessControlAllowList(response.httpHeaderField(HTTPHeaderName::AccessControlAllowMethods), m_methods);
-
-    m_headers.clear();
-    parseAccessControlAllowList<ASCIICaseInsensitiveHash>(response.httpHeaderField(HTTPHeaderName::AccessControlAllowHeaders), m_headers);
+    m_methods = parseAccessControlAllowList(response.httpHeaderField(HTTPHeaderName::AccessControlAllowMethods));
+    m_headers = parseAccessControlAllowList<ASCIICaseInsensitiveHash>(response.httpHeaderField(HTTPHeaderName::AccessControlAllowHeaders));
 
     Seconds expiryDelta = 0_s;
     if (parseAccessControlMaxAge(response.httpHeaderField(HTTPHeaderName::AccessControlMaxAge), expiryDelta)) {