Code:
Jsoup.connect("http://www.warriorforum.com/").followRedirects(true).get();
Log cat error:
10-14 11:58:08.593: ERROR/MY(24780): TRY1: download failed java.io.IOException: Too many redirects occurred trying to load URL http://www.warriorforum.com/
As you can see in Jsoup Connection class the exception is thrown in private Response(Response previousResponse) throws IOException when redirect count exceeds private static final int MAX_REDIRECTS = 20;
Worked about 12h ago fine, but something has changed on the host side and I can’t figure out what. When viewing the url with browser, there doesn’t seem to be any redirects. What is causing this error?
EDIT – accessing subforums and topics with Jsoup.connect(url).get() is working, but not the main page.
If I open the URL in my browser (Chrome), I get “This webpage has a redirect loop”. It responds with a 301 and the very same URL as the new Location (http://www.warriorforum.com/).
Maybe the website is still cached in the browser? Maybe the redirect depends on client specifics (like language, country, browser, …)?