mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-08-08 23:06:54 +02:00
Fix early termination bug in cookiesForURL
The condition for the while loop was causing the config cookie search to break after only checking the full domain, instead of trying higher-level domains. For example www.imagefap.com would be tried but not imagefap.com.
This commit is contained in:
@@ -81,8 +81,9 @@ public class Http {
|
|||||||
while (parts.length > 1) {
|
while (parts.length > 1) {
|
||||||
String domain = String.join(".", parts);
|
String domain = String.join(".", parts);
|
||||||
// Try to get cookies for this host from config
|
// Try to get cookies for this host from config
|
||||||
|
logger.info("Trying to load cookies from config for " + domain);
|
||||||
cookieStr = Utils.getConfigString("cookies." + domain, "");
|
cookieStr = Utils.getConfigString("cookies." + domain, "");
|
||||||
if (cookieStr.equals("")) {
|
if (!cookieStr.equals("")) {
|
||||||
cookieDomain = domain;
|
cookieDomain = domain;
|
||||||
// we found something, start parsing
|
// we found something, start parsing
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user