Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
REGRESSION(r228371): WebAutomationSession::deleteAllCookies doesn't d…
…elete some cookies https://bugs.webkit.org/show_bug.cgi?id=184334 <rdar://problem/39212863> Reviewed by Timothy Hatcher. When WebDriver adds a cookie for 'localhost', it actually uses the domain '.localhost' per RFC. When deleting cookies, we first fetch all cookies matching the document's hostname, and then delete them one by one. However, this code path does not add the dot prefix. This causes no cookies to match the requested domain, and thus none of them are deleted. * UIProcess/Automation/WebAutomationSession.cpp: (WebKit::domainByAddingDotPrefixIfNeeded): Extract this helper method. (WebKit::WebAutomationSession::addSingleCookie): Use helper method. (WebKit::WebAutomationSession::deleteAllCookies): Add a dot prefix when requesting to delete all cookies for a hostname. Canonical link: https://commits.webkit.org/199941@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230367 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
with
34 additions
and 8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters