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: Redirect Error
Date Mon, 19 Jan 2009 14:28:20 GMT
On Fri, 2009-01-16 at 15:27 +0200, Roger Varley wrote:
> Hi
> 
> I'm using httpclient 3.1 indirectly through htmlunit. I believe that 
> httpclient is used for managing the connection and data transmission. If I'm 
> incorrect please forgive me and ignore me :)
> 
> I'm sending a GET request and the remote site is sending a 302 response and a 
> re-direct address in the form 
> http://remotesite.com/exprod/search/../servlet?t=350&manual.html. When I do 
> this manually through Firefox and look at whats happening through the 
> LiveHTTPHeader plugin, I can see the 302 response code and the URL coming in. 
> Firefox redirects to an amended url 
> http://remotesite.com/exprod/servlet?t=350&manual.html and gets a 200 response 
> and the document manual.html
> 
> HttpClient is not "fixing" the URL and is retransmitting 
> http://remotesite.com/exprod/search/../servlet?t=350&manual.html which results 
> in a 404 error.
> 
> Is this a bug or expected behaviour? What do I need to do to get around this 
> problem?
> 

Yes, this is expected behavior. HttpClient is not supposed to 'fix'
location URLs. It is not a browser. 

With 4.0 API one can easily  override the default behavior, though.

Oleg 

> Regards
> 
> ---------------------------------------------------------------------
> 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