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

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

TIdCookieRFC2965 extends TIdCookieRFC2109 by adding additional extended Cookie headers, and allows additional Cookie attributes to be indicated in the CommentURL, Discard, and PortList properties.

TIdCookieRFC2965 differs from the original Netscape Cookie proposal, but can interoperate with HTTP/1.0 clients that use the Netscape Cookie mechanism. The significant differences in TIdCookieRFC2965 are the ability to formulate extended Cookie headers that contain MaxAge, Discard, and PortList attribute values.


TIdCookieRFC2965.CommentURL
TIdCookieRFC2965
Represents a network resource for user data or documentation about the Cookie.
property CommentURL: String;
Description
CommentURL is a String property that represents the optional Cookie attribute used to derive or store private information about a user, and allows an origin server to document how it intends to use the Cookie. CommentURL refers to a Univesal Resource Locator for the network resource.

An HTTP client can inspect CommentURL to decide whether to initiate or continue a session with this Cookie. If a Cookie includes a CommentURL value, the HTTP client should store that information in a human-readable form with the Cookie, or, preferably, should allow the user to follow the link as part of a Cookie inspection user interface.


TIdCookieRFC2965.Discard
TIdCookieRFC2965, See Also
Indicates that a Cookie should be discarded after use.
property Discard: Boolean;
Description
Discard is a Boolean property that represents an optional Cookie attribute that indicates how the Cookie is handled during Cookie management. When Discard is True, the HTTP client should unconditionally discard the Cookie when the user agent terminates.

Use MaxAge or Expires to control Cookie longevity based on dates or duration.


TIdCookieRFC2965.PortList
TIdCookieRFC2965
Represents port numbers allowed for HTTP requests.
property PortList [AIndex: Integer]: Integer;
Description
PortList is an Array property that contains optional Integer values representing port numbers where a Cookie may be returned in an HTTP request. PortList is accessed using the zero-based Integer index value specified in AIndex. A Cookie can be rejected in an HTTP request when the port number for the request does not match a value specified in PortList.

The default HTTP port (80) is added to PortList when no explicit values are specified.


TIdCookieRFC2965.Create
TIdCookieRFC2965
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.

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