Update ProxyAcceptCookiePolicy.java

The guide says: When we create an instance of ProxyAcceptCookiePolicy, we pass in a String of the domain address we would like to accept cookies from **in addition to** the original server.
This commit is contained in:
Orange 2019-03-08 19:39:51 +08:00 committed by GitHub
parent c5fbfa2329
commit 2f5ff0c75b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,8 +17,8 @@ public class ProxyAcceptCookiePolicy implements CookiePolicy {
host = uri.getHost();
}
if (!HttpCookie.domainMatches(acceptedProxy, host)) {
return false;
if (HttpCookie.domainMatches(acceptedProxy, host)) {
return true;
}
return CookiePolicy.ACCEPT_ORIGINAL_SERVER.shouldAccept(uri, cookie);