[prev in list] [next in list] [prev in thread] [next in thread]
List: httpclient-users
Subject: Re: Redirect Error
From: Oleg Kalnichevski <olegk () apache ! org>
Date: 2009-01-19 14:28:20
Message-ID: 1232375300.12412.14.camel () ubuntu
[Download RAW message or body]
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic