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: Cookie Expiry Date
Date Wed, 21 Mar 2007 12:39:34 GMT
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:ROLWEBER@de.ibm.com] 
> 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: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> 
> 


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


Mime
View raw message