You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by masukomi <ma...@masukomi.org> on 2004/06/26 19:45:27 UTC

[project HttpClient] Redirect not supported error

It all started when I added in a .htaccess file with a Redirect temp  
line in it.
Now my GetMethod returns
org.apache.commons.httpclient.HttpException: Redirect from host <some  
domain> to <some other domain> is not supported
setFollowRedirects was set to true. I can't really find any docs on  
what isn't being supported and what I have to do to make it actually  
follow them.

Any ideas?



org.apache.commons.httpclient.HttpException: Redirect from host <some  
domain> to <some other domain> is not supported
org.apache.commons.httpclient.HttpMethodBase.checkValidRedirect(HttpMeth 
odBase.java:1243)   
org.apache.commons.httpclient.HttpMethodBase.processRedirectResponse(Htt 
pMethodBase.java:1191)
org.apache.commons.httpclient.HttpMethodBase.checkValidRedirect(HttpMeth 
odBase.java:1243)   
org.apache.commons.httpclient.HttpMethodBase.isRetryNeeded(HttpMethodBas 
e.java:977)
org.apache.commons.httpclient.HttpMethodBase.checkValidRedirect(HttpMeth 
odBase.java:1243)     
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java 
:1095)
org.apache.commons.httpclient.HttpMethodBase.checkValidRedirect(HttpMeth 
odBase.java:1243)     
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java: 
675)
org.apache.commons.httpclient.HttpMethodBase.checkValidRedirect(HttpMeth 
odBase.java:1243)     
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java: 
529)


-Kate Rhodes
Open source consultant & Java developer
http://www.masukomi.org


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


Re: [project HttpClient] Redirect not supported error

Posted by Oleg Kalnichevski <ol...@bluewin.ch>.
Kate,

This is a much complained about limitation of HttpClient 2.0. There are
basically two possibilities:

(1) you can use HttpClient 3.0 alpha1 which is capable of handling
cross-site redirects automatically 
(2) manually handle cross-site redirects with HttpClient 2.0

For details refer to the HttpClient redirect guide

http://jakarta.apache.org/commons/httpclient/redirects.html

HTH

Oleg


On Sat, 2004-06-26 at 19:45, masukomi wrote:
> It all started when I added in a .htaccess file with a Redirect temp  
> line in it.
> Now my GetMethod returns
> org.apache.commons.httpclient.HttpException: Redirect from host <some  
> domain> to <some other domain> is not supported
> setFollowRedirects was set to true. I can't really find any docs on  
> what isn't being supported and what I have to do to make it actually  
> follow them.
> 
> Any ideas?
> 
> 
> 
> org.apache.commons.httpclient.HttpException: Redirect from host <some  
> domain> to <some other domain> is not supported
> org.apache.commons.httpclient.HttpMethodBase.checkValidRedirect(HttpMeth 
> odBase.java:1243)   
> org.apache.commons.httpclient.HttpMethodBase.processRedirectResponse(Htt 
> pMethodBase.java:1191)
> org.apache.commons.httpclient.HttpMethodBase.checkValidRedirect(HttpMeth 
> odBase.java:1243)   
> org.apache.commons.httpclient.HttpMethodBase.isRetryNeeded(HttpMethodBas 
> e.java:977)
> org.apache.commons.httpclient.HttpMethodBase.checkValidRedirect(HttpMeth 
> odBase.java:1243)     
> org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java 
> :1095)
> org.apache.commons.httpclient.HttpMethodBase.checkValidRedirect(HttpMeth 
> odBase.java:1243)     
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java: 
> 675)
> org.apache.commons.httpclient.HttpMethodBase.checkValidRedirect(HttpMeth 
> odBase.java:1243)     
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java: 
> 529)
> 
> 
> -Kate Rhodes
> Open source consultant & Java developer
> http://www.masukomi.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 


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