hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Redirected - but where? (revisited)
Date Fri, 05 Dec 2008 19:04:35 GMT
Stuart White wrote:
> This question is in response to the following post:
> 
> http://marc.info/?l=httpclient-users&m=121147890106497&w=2
> 
> This message describes the appropriate way to determine where an http
> request was redirected.
> 
> It seems that this code does not function properly when going through a proxy.
> 
> I've attached example code.
> 
> To demonstrate, run the example.  You see that "http://www.google.com"
> correctly gets redirected to "http://www.google.com/" (notice the
> trailing slash).
> 
> Now, edit redirect.java.  Change line 28 to "if (true)" and change
> line 30 to use your proxy host.  Then re-run the example.
> 
> When I do this, I get the following output:
> 
> ResolvedURL=http://www.google.comhttp://www.google.com
> 
> Any ideas why this is happening?  Do I need different logic to
> determine the redirect url when going through a proxy?
> 
> Thanks!
> Stuart

Hi Stuart

It is obviously a bug in HttpClient. However, I do not think this has 
anything to do with redirect handling. Most likely things get screwy 
much earlier, when calculating the request URI for the proxied request.

I will look into fixing the problem.

Cheers

Oleg

> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message