commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Charles Huey" <stephenh...@fastmail.fm>
Subject HttpClient: Maximum redirects (100) exceeded
Date Tue, 06 Apr 2004 23:31:03 GMT
Please excuse my ignorance if I ask a really dumb question.  I've been
using HttpClient without trouble for a long time, and it accesses a
secure site for me really well.  However, something on the site seems to
have changed, and now I'm experiencing an exception telling me the
maximum number of redirects has been exceeded.  The method
getFollowRedirects() tells me that it's set to true, but I'm guessing
that internally HttpClient or the HttpMethod sets that to false once a
certain number have been followed/received.  Is this correct?  

Every method I try to execute afterwards says getFollowRedirects is false
even though I explicitly set it to true right before querying that.  Or
does the fact that they're all POST methods have anything to do with them
being disabled from following redirects?  

Here's where my ignorance rears its head:  when I'm using a web browser
on the site and click on the link for the simple GET request, it loads up
the next page very quickly, so I'm wondering if it's possible that there
were really 100+ redirects in that time span, or if HttpClient is being
confused somehow.  

My main question is, how do I get around this problem, or is there no way
to do it with HttpClient?  I'm getting this exception message on the
simple GET request:

Apr 6, 2004 6:25:58 PM org.apache.commons.httpclient.HttpMethodBase
execute
SEVERE: Narrowly avoided an infinite loop in execute
org.apache.commons.httpclient.HttpRecoverableException: Maximum redirects
(100) exceeded
        at
        org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1111)
        at
        org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:675)
        at
        org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:529)
        at QuickWebImporter.importAll(QuickWebImporter.java:76)
        at QuickWebImporter.main(QuickWebImporter.java:148)
getAddressBook follow redirects again: true
postExportPage follow redirects: false
Apr 6, 2004 6:25:58 PM org.apache.commons.httpclient.HttpMethodBase
processRedirectResponse
INFO: Redirect requested but followRedirects is disabled

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message