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 13:28:21 GMT
esu2 wrote:
> Thank you.
> Unfortunatly, this is a HTTPS site (pass user name/password). How do I
> capture sent packet?
> 
> Anyone see the similar problem?
> 
> 

Use a plugin such as HttpFox [1] to capture HTTP packets on the browser 
side, and the wire logging on the HttpClient side

[1] https://addons.mozilla.org/en-US/firefox/addon/6647
[2] http://hc.apache.org/httpclient-3.x/logging.html

Oleg

> 
> olegk wrote:
>> 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.
>>
>> Oleg
>>
>>
>> ---------------------------------------------------------------------
>> 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