Hi Oleg,

Thanks for the response!

Suppose server sends a cookie with some expiry date.

When http client resends this cookie does it check for its expiry date?

I mean if the cookie is expired does http client discard it
automatically?

Regards,
Lalit

-----Original Message-----
From: Oleg Kalnichevski [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 21, 2007 6:10 PM
To: HttpClient User Discussion
Subject: RE: Cookie Expiry Date

On Wed, 2007-03-21 at 18:02 +0530, Lalit Sahoo wrote:
> Hi Roland,
> 
> I can access the cookies automatically added by server.
> Can I modify their expiry date and resend again to server?
> 
> Regards,
> Lalit
> 

Lalit,

Client side cookie and server side cookie is NOT the same thing. The
server determines the expiry date of a cookie, not the client. The
client can only read this attribute and discard the cookie if deemed
expired.

Oleg 


> -----Original Message-----
> From: Roland Weber [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, March 21, 2007 5:53 PM
> To: HttpClient User Discussion
> Subject: RE: Cookie Expiry Date
> 
> Hi Lalit,
> 
> > From the http client cookie guide I found following:
> > 
> > The cookie management API of HttpClient can co-exist with the manual
> > cookie handling. One can manually set request Cookie headers or
> process
> > response Set-Cookie headers in addition or instead of the automatic
> > cookie management
> > 
> > From this I understood that I can manage cookies by myself.
> > 
> > Could you please help me in understanding the above point?
> 
> This refers to the cookies being stored/collected/managed in
HttpState:
>
http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/
> httpclient/HttpState.html
> 
> You can manually add cookies there, or delete those that have
> automatically been added from HTTP responses. You can also
> access the expiry date in each cookie object to decide whether
> you'd like to delete a cookie or not.
> 
> Your original question was about managing cookie expiry dates,
> not about managing cookies ;-)
> 
> hope that helps,
>   Roland
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail:
[EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to