Indy 9
TIdCookieRFC2109
Hierarchy, Properties, Methods, See Also, Unit: IdCookie
Implements a persistent session mechanism using Cookies with extended headers.
TIdCookieRFC2109 = class(TIdNetscapeCookie)
Unit
IdCookie
Description
TIdCookieRFC2109 is a TIdNetscapeCookie descendant that implements a persistent session mechanism using Cookies in HTTP requests and responses, as described in the Internet Standards document:

  • RFC 2109 - HTTP State Management Mechanism (http://www.rfc-editor.org/rfc/rfc2109.txt)

TIdCookieRFC2109 extends TIdNetscapeCookie by adding extended Cookie headers, and allows additional Cookie attributes to be indicated in the MaxAge, Comment, and Version properties.

TIdCookieRFC2109 differs from the original Netscape Cookie proposal, and uses MaxAge to represent the longevity of Cookie data.


TIdCookieRFC2109.Comment
TIdCookieRFC2109
Represents private data or documentation in a Cookie.
property Comment: String;
Description
Comment is a String property that represents an optional Cookie attribute that can contain private information about the user, or document the intended use of the Cookie. An HTTP Client can inspect values in Comment to decide whether to initiate or continue a session with this Cookie.

TIdCookieRFC2109.MaxAge
TIdCookieRFC2109, See Also
Represents the longevity of the Cookie.
property MaxAge: Int64;
Description
MaxAge is a Int64 property that represents the optional Cookie attibute that defines the lifetime of the Cookie in seconds. The MaxAge value is a decimal non-negative integer.

When MaxAge seconds elapse, the client should discard the Cookie. A value of zero means the cookie should be discarded immediately. When MaxAge contains the value GFMaxAge, a value has not been determined or assigned to the MaxAge property.

Changing the value of the inherited Expires property will result in the MaxAge property being recalculated using the date value in Expires.


TIdCookieRFC2109.Version
TIdCookieRFC2109
Version of the Cookie specification supported.
property Version: String;
Description
Version is a String property that represents the Cookie attribute that specifies the version number of the state management specification supported by the Cookie. Version is required in TIdCookieRFC2109, and assumes the Version value is "1" when no explicit value is supplied in the property.

TIdCookieRFC2109.Create
TIdCookieRFC2109, See Also
Constructor for the object instance.
constructor Create(ACollection: TCollection); override;
Parameters
ACollection: TCollection
Collection that owns the collection item.
Description
Create is the constructor for the object instance, and calls the inherited Create method using the collection that owns the Cookie specified in ACollection. Create also sets the MaxAge property to the default value GFMaxAge, indicating that no MaxAge value has determined.

Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.