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: authentication fail, how do I get redirect URL?
Date Sun, 15 Mar 2009 12:17:44 GMT
On Sat, 2009-03-14 at 13:28 -0700, esu2 wrote:
> Hi 
> I'm using HTTPClient to access a single sign on page. I post request to
> login form with wrong password, I got http response status = 401
> (authentication fail). I think this make sense.
> However, I do the same thing in Firefox and watch the headers, above request
> result in 302 response and redirect to a "login fail" page.
> My question is how to mimic this behivior in HTTPClient. in HTTPClient, I
> don't get 302. therefore, I'm not able to get the URL of "login fail" page.

Capture HTTP packets generated by the browser, find the difference with
those produced by HttpClient, tweak your code to make HttpClient produce
exact / compatible packets.


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

View raw message