hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eduardo J. Ortega U." <ejorte...@gmail.com>
Subject Re: HttpClient not sending cookie?
Date Tue, 10 Jun 2008 14:07:31 GMT
Hi, Sebb, Oleg:

> Oleg was referring to the Cookie mode:
>
> params.setParameter(HttpMethodParams.COOKIE_POLICY,CookiePolicy.BROWSER_COMPATIBILITY)
>

I attempted to use the browser compatibility policy, but the same post
request isn't sending the cookie yet:

2008/06/10 08:51:10:558 GMT-05:00 [DEBUG] DefaultHttpParams - Set
parameter http.protocol.cookie-policy = compatibility
...
2008/06/10 08:51:10:730 GMT-05:00 [DEBUG] header - >> "POST
http://www.fosyga.gov.co/CGI/buda_logon.asp HTTP/1.1[\r][\n]"
...
2008/06/10 08:51:11:153 GMT-05:00 [DEBUG] header - << "Set-Cookie:
ASPSESSIONIDSSQBCQTT=GKDIJBEDIFLFEBMJKOEJPBOI; path=/[\r][\n]"
...
2008/06/10 08:51:11:169 GMT-05:00 [DEBUG] header - >> "GET
http://www.fosyga.gov.co/CGI/buda_consulta_afil.asp?sstat=0
HTTP/1.1[\r][\n]"
...
2008/06/10 08:51:11:169 GMT-05:00 [DEBUG] header - >> "Cookie:
ASPSESSIONIDSSQBCQTT=GKDIJBEDIFLFEBMJKOEJPBOI[\r][\n]"
...
2008/06/10 08:51:11:373 GMT-05:00 [DEBUG] header - >> "POST
http://fosyga.gov.co/CGI/buda_consulta_afil.asp HTTP/1.1[\r][\n]"
...
(No cookie header here)
...
2008/06/10 08:51:11:514 GMT-05:00 [DEBUG] header - << "Set-Cookie:
ASPSESSIONIDSSQBCQTT=HKDIJBEDCFOOAJIIMEELCKNK; path=/[\r][\n]"

Is there any way to force it to always send the cookie? I was also
thinking about getting the cookie from the state and then add the
cookie header myself, but I read that the CookieModule expects to be
the only one handling cookies and that it would remove any cookie
headers I put by hand.

Thanks,


-- 
Eduardo J. Ortega U.

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