You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by "droidin.net" <dr...@droidin.net> on 2010/06/08 07:29:26 UTC

Redirect is not followed on POST

I'm trying to automate 2-step search request. There's no JS and no
authentication the form is HTTP Post to ASP page followed by 302 GET
redirect which supposed to return batch of search results. Subsequent GET
requests can be issued to paginate through results. My problem is that when
I execute the form it comes back with 200 and the same page that contains
the initial POST form. I'm wondering if the redirect is not followed for
some reason and if so - how can I force it? I'm using HttpClient 4

Thanks,

Bo
-- 
View this message in context: http://old.nabble.com/Redirect-is-not-followed-on-POST-tp28813921p28813921.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


Re: Redirect is not followed on POST

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Mon, 2010-06-07 at 22:29 -0700, droidin.net wrote:
> I'm trying to automate 2-step search request. There's no JS and no
> authentication the form is HTTP Post to ASP page followed by 302 GET
> redirect which supposed to return batch of search results. Subsequent GET
> requests can be issued to paginate through results. My problem is that when
> I execute the form it comes back with 200 and the same page that contains
> the initial POST form. I'm wondering if the redirect is not followed for
> some reason and if so - how can I force it? I'm using HttpClient 4
> 
> Thanks,
> 
> Bo

Per requirements of the HTTP specification redirects on POST methods may
not be handled automatically without a user intervention. You can
override the standard compliant behavior by implementing a custom
redirect handler / strategy.

Hope this helps

Oleg



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