commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Charles Huey" <>
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
SEVERE: Narrowly avoided an infinite loop in execute
org.apache.commons.httpclient.HttpRecoverableException: Maximum redirects
(100) exceeded
        at QuickWebImporter.importAll(
        at QuickWebImporter.main(
getAddressBook follow redirects again: true
postExportPage follow redirects: false
Apr 6, 2004 6:25:58 PM org.apache.commons.httpclient.HttpMethodBase
INFO: Redirect requested but followRedirects is disabled

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message