diff options
Diffstat (limited to 'Source/WebCore/loader/CrossOriginAccessControl.h')
-rw-r--r-- | Source/WebCore/loader/CrossOriginAccessControl.h | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/Source/WebCore/loader/CrossOriginAccessControl.h b/Source/WebCore/loader/CrossOriginAccessControl.h index 0b2d272bd..8a710437d 100644 --- a/Source/WebCore/loader/CrossOriginAccessControl.h +++ b/Source/WebCore/loader/CrossOriginAccessControl.h @@ -10,10 +10,10 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -24,34 +24,30 @@ * */ -#ifndef CrossOriginAccessControl_h -#define CrossOriginAccessControl_h +#pragma once #include "ResourceHandleTypes.h" #include <wtf/Forward.h> -#include <wtf/HashSet.h> -#include <wtf/text/StringHash.h> namespace WebCore { -typedef HashSet<String, CaseFoldingHash> HTTPHeaderSet; - class HTTPHeaderMap; +enum class HTTPHeaderName; class ResourceRequest; class ResourceResponse; class SecurityOrigin; +class URL; bool isSimpleCrossOriginAccessRequest(const String& method, const HTTPHeaderMap&); bool isOnAccessControlSimpleRequestMethodWhitelist(const String&); -bool isOnAccessControlSimpleRequestHeaderWhitelist(const String& name, const String& value); bool isOnAccessControlResponseHeaderWhitelist(const String&); -void updateRequestForAccessControl(ResourceRequest&, SecurityOrigin*, StoredCredentials); -ResourceRequest createAccessControlPreflightRequest(const ResourceRequest&, SecurityOrigin*); +void updateRequestForAccessControl(ResourceRequest&, SecurityOrigin&, StoredCredentials); +ResourceRequest createAccessControlPreflightRequest(const ResourceRequest&, SecurityOrigin&, const String&); -bool passesAccessControlCheck(const ResourceResponse&, StoredCredentials, SecurityOrigin*, String& errorDescription); -void parseAccessControlExposeHeadersAllowList(const String& headerValue, HTTPHeaderSet&); +bool isValidCrossOriginRedirectionURL(const URL&); +void cleanRedirectedRequestForAccessControl(ResourceRequest&); -} // namespace WebCore +bool passesAccessControlCheck(const ResourceResponse&, StoredCredentials, SecurityOrigin&, String& errorDescription); -#endif // CrossOriginAccessControl_h +} // namespace WebCore |