hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From motital74 <moti...@gmail.com>
Subject Re: POST response with status 302 doesn't redirect
Date Thu, 04 Nov 2010 18:37:46 GMT

Thank you Ryan
I looked after RedirectStrategy as part of 4.0.3 with no luck.
I have implemented the RedirectHandler and got the foolowing Exception:
Exception in thread "main" java.lang.IllegalArgumentException: Host name may
not be null

In the getLocationURI I return the URI from the response header (Location).

Appreciate your help


Ryan Smith-10 wrote:
> 
> Redirecting POSTs breaks RFC standards.  You need to extend and implement
> your own RedirectHandler/RedirectStrategy and tell HttpClient to use it
> instead of the default one.
> 
> hth.
> 
> On Thu, Nov 4, 2010 at 1:45 PM, motital74 <motital@gmail.com> wrote:
> 
>>
>> Hello
>>
>> I am using httpclient 4.0.3 GA.
>> I am trying to connect to a website using the http client which required
>> POST request (https).
>> The response HTTP status of the POST request is 302 (the location header
>> as
>> the URI).
>> for some reason that I don't understand the http client doesn't redirect
>> it.
>> The expected result is GET METHOD with the redirect URI.
>> Any Idea?
>> --
>> View this message in context:
>> http://old.nabble.com/POST-response-with-status-302-doesn%27t-redirect-tp30134484p30134484.html
>> Sent from the HttpClient-User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
>> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://old.nabble.com/POST-response-with-status-302-doesn%27t-redirect-tp30134484p30134949.html
Sent from the HttpClient-User mailing list archive at Nabble.com.


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