Indy 9
TIdServerCookie
Hierarchy, Properties, Methods, See Also, Unit: IdCookie
Implements a collection item for HTTP Server Cookies.
TIdServerCookie = class(TIdCookieRFC2109)
Unit
IdCookie
Description
TIdServerCookie is a TIdCookieRFC2109 descendant that implements a collection item for a TIdServerCookies collection. TIdServerCookie is created and used by TIdHTTPServer in an HTTP request or response.

TIdServerCookie differs from TIdCookieRFC2109 by reinstituting use of the Expires property, instead of MaxAge, to indicate when Cookie data is no longer valid. There is many web browsers which does not support Max-Age as defined in RFC2109 and simply ignore it.


TIdServerCookie.AddAttribute
TIdServerCookie, See Also
Maintains attribute names and values for the Server Cookie.
procedure AddAttribute(const Attribute: String; const Value: String);
Parameters
const Attribute: String
Cookie attribute name to be updated.
const Value: String
Cookie attribute value to be updated.
Description
AddAttribute is a procedure that allows the server Cookie to correctly maintain the Path and Domain properties based on Cookie headers received in an HTTP client request. AddAttribute checks the Cookie attribute named in Value for the presense of the special Value '$PATH' or '$DOMAIN'. When Attribute contains either of these special Cookie headers, the data in Value is assigned to the corresponding Path or Domain property.

TIdServerCookie.Create
TIdServerCookie
Constructor for the object instance.
constructor Create(ACollection: TCollection); override;
Description
Create is the constructor for the object instance. Create calls the inherited Create method using the collection that owns the collection item specified in ACollection. Create also set value for the internal version representation to cvNetscape.

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