CCookie::setVersion

The CCookie::setVersion function sets the version of the cookie.

int setVersion(
int version // specifying the version of the cookie
);



Return Type

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


Parameters

version
An integer specifying the version of the cookie.


Remarks

This function sets the version of the cookie. Version 1 complies with RFC 2965, and version 0 complies with the original Netscape Cookie Specification. Cookies provided by a browser use and identify the browser's cookie version.

The CCookie::getVersion function can be used to retrieve the version of the cookie.


See Also

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

Example