CCookie::setComment

The CCookie::setComment function sets the Comment attribute which describes the purpose of this cookie.

int setComment(
chchar * comment // containing the value of the Comment attribute
);



Return Type

int
Upon successful completion, zero is returned. Otherwise, a value of non-zero is returned.


Parameters

comment
A string containing the value of the Comment attribute of the cookie.


Remarks

This function sets the Comment attribute which describes the purpose of this cookie. Because cookies can be used to derive or store private information about a user, the value of the Comment attribute allows an origin server to document how it intends to use the cookie. The user can inspect the information to decide whether to initiate or continue a session with this cookie. Characters in value MUST be in UTF-8 encoding. [RFC2279]

Attribute of Comment are not supported by Netscape Cookies Version 0.

The CCookie::getComment function can be used to retrieve the Comment attribute of the cookie.


See Also

CCookie, CCookie::getComment, CResponse::addCookie, CRequest::getCookies, CRequest::getCookie

Example