commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@bluewin.ch
Subject RE: HttpClient Header Problem
Date Thu, 23 Oct 2003 12:12:38 GMT
Hi José,

Simply use HttpState#addCookie method to add a cookie to the HTTP session.
Currently HttpClient overwrites manually set 'Cookie' headers. You are not
the first one to have fallen into this trap. Quite a few people complained
about what they see as disappearance of manually set 'Cookie' headers. I
am planning to provide a patch against CVS HEAD soon. The fix, however, is
not likely to make it into our stable 2.0 branch, so I strongly encourage
to use HttpState class to handle cookies.

Cheers

Oleg


>-- Original Message --
>Reply-To: "Jakarta Commons Users List" <commons-user@jakarta.apache.org>
>Reply-To: <jose.gustavo@emacdigital.com.br>
>From: José Gustavo Zagato <jose.gustavo@emacdigital.com.br>
>To: "'Jakarta Commons Users List'" <commons-user@jakarta.apache.org>
>Subject: HttpClient Header Problem
>Date: Thu, 23 Oct 2003 08:44:37 -0300
>
>
>Hi Folks !
> 
>      I'm trying to develop an applet with uses the commons httpclient
>to interact with a struts action. I developed a few examples and it
>worked fine, but now I need to somehow make the applet "join" the http
>session started by the browser with loaded the applet. I tried to add a
>Cookie to the request with contains the session id. In another shot I
>tried to add a new header entry with contains the session id.
>Unfortunately all shots went to wrong directions.
> 
>      So does anyone here has a example on how to add a new header entry
>to a http get request ? There is any thing special that I need to do to
>"join" a already started session ? How deep is the rabbit hole ?
> 
>Cheers !
> 
>  José Gustavo Zagato Rosa
>System Analyst - Atos Origin
>jose.gustavo@emacdigital.com.br
> 
> 
> 
>  José Gustavo Zagato Rosa
>System Analyst - Atos Origin
>jose.gustavo@emacdigital.com.br
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message