forked from j62/ctbrec
Delete all LiveJasmin cookies, if we are guests
This commit is contained in:
parent
0417fd6bfb
commit
aa093c0ec1
|
@ -21,16 +21,10 @@ public class LiveJasminHttpClient extends HttpClient {
|
||||||
protected LiveJasminHttpClient() {
|
protected LiveJasminHttpClient() {
|
||||||
super("livejasmin");
|
super("livejasmin");
|
||||||
|
|
||||||
// delete session, if we are guests, because old guest sessions cause
|
// delete all cookies, if we are guests, because old guest sessions cause
|
||||||
// endless redirects
|
// endless redirects
|
||||||
if(Config.getInstance().getSettings().livejasminUsername.isEmpty()) {
|
if(Config.getInstance().getSettings().livejasminUsername.isEmpty()) {
|
||||||
HttpUrl url = HttpUrl.parse("https://" + LiveJasmin.baseDomain);
|
getCookieJar().clear();
|
||||||
try {
|
|
||||||
getCookieJar().deleteCookie(url, "session");
|
|
||||||
} catch (NoSuchElementException e) {
|
|
||||||
LOG.debug("Session cookie not found -> let's go!");
|
|
||||||
// fine, no session cookie means we are good to go
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue