Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timob 11090 #3199

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
import ti.modules.titanium.xml.DocumentProxy;
import ti.modules.titanium.xml.XMLModule;
import android.net.Uri;
import android.webkit.CookieManager;

public class TiHTTPClient
{
Expand Down Expand Up @@ -702,6 +703,7 @@ public String getAllResponseHeaders()
public void clearCookies(String url)
{
List<Cookie> cookies = new ArrayList<Cookie>(client.getCookieStore().getCookies());
CookieManager cookieManager = CookieManager.getInstance();
client.getCookieStore().clear();
String lower_url = url.toLowerCase();

Expand All @@ -710,6 +712,8 @@ public void clearCookies(String url)
client.getCookieStore().addCookie(cookie);
}
}
cookieManager.setCookie(url, null);
cookieManager.removeAllCookie();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This destroys all cookies, not just cookies from the specified domain. I opened a new feature request for this issue: http://jira.appcelerator.org/browse/TIMOB-11570. Closing this PR.

}

public void setRequestHeader(String header, String value)
Expand Down