diff --git a/src/fr/devinsy/statoolinfos/uptime/UptimeSurveyor.java b/src/fr/devinsy/statoolinfos/uptime/UptimeSurveyor.java index 2d5d03a..a10806a 100644 --- a/src/fr/devinsy/statoolinfos/uptime/UptimeSurveyor.java +++ b/src/fr/devinsy/statoolinfos/uptime/UptimeSurveyor.java @@ -19,6 +19,8 @@ package fr.devinsy.statoolinfos.uptime; import java.io.IOException; +import java.net.CookieHandler; +import java.net.CookieManager; import java.net.HttpURLConnection; import java.net.URL; import java.util.concurrent.ExecutorService; @@ -93,7 +95,7 @@ public class UptimeSurveyor if ((result == 301) || (result == 302) || (result == 307) || (result == 308)) { - System.out.println("BOUND DETECTED " + currentURL.toString() + " -> " + location); + System.out.println(Thread.currentThread().getId() + " BOUND DETECTED " + currentURL.toString() + " -> " + location); currentURL = new URL(location); currentBound += 1; @@ -153,6 +155,11 @@ public class UptimeSurveyor } */ + // + CookieManager cookieManager = new CookieManager(); + CookieHandler.setDefault(cookieManager); + + // ExecutorService pool = Executors.newFixedThreadPool(20); for (Uptime uptime : result) {