TIdResponseHeaderInfo
Implements message headers for an HTTP response.
Unit
Description
TIdResponseHeaderInfo is a
TIdEntityHeaderInfo descendant that implements properties and methods needed to represent message headers for a HTTP response, as described in the Internet Standards document:
- RFC 2616 - Hypertext Transfer Protocol version 1.1 [HTTP/1.1] (http://www.rfc-editor.org/rfc/rfc2616.txt)
The response headers allow the server to provide additional information about the response, or the requested resource, on the server.
Redirects the user agent to a new location for a requested resource.
property Location: string;
Description
Location is a String property used to redirect the recipient of the HTTP response to a location other than the request URI when accessing a new or exisitng server resource. Location contains a valid URI expressed in the form:
http://www.w3.org/pub/WWW/People.html
Represents Proxy Authentication headers and values for a connection.
Description
ProxyAuthenticate is a
TIdHeaderList property that contains header names and values for a Proxy Authentication challenge. ProxyAuthenticate values indicate the authentication scheme and parameters applicable to the proxy for the requested server resource. ProxyAuthenticate header values apply to the current proxy connection and should not be passed to a user agent.
Indicates the action to perform for a proxied connection after an HTTP response.
property ProxyConnection: string;
Description
ProxyConnection is a String property that represents the value received in an HTTP response for the 'Proxy-connection' header. ProxyConnection indicates that an HTTP response using a proxied connection should perform the indicated action after completion of the HTTP Response. ProxyConnection can contain one of the values:
- KEEP—ALIVE - The connection should be maintained for subsequent use.
- CLOSE - The connection should be closed.
Identifies the software used on the server.
Description
Server is a String property that contains information about the software used by the server to handle the HTTP request. Server can contain multiple product tokens and comments identifying the server and any significant subproducts. For example:
Server: CERN/3.0 libwww/2.17
Notes
Revealing the specific software version of the server might allow the server machine to become more vulnerable to attacks against software that is known to contain security holes. Server implementors are encouraged to make this field a configurable option.
Identifies authentication schemes and parameters for a server realm.
Description
WWWAuthenticate is a
TIdHeaderList property that contains header names and values used to indicate at least one authentication scheme and parameters for a requested server resource. Unlike
ProxyAuthenticate headers, WWWAuthenticate values apply to any connection using the relevant server realm.
Resets response header properties to their default values.
procedure Clear; override;
Description
Clear is an overridden procedure in
TIdResponseHeaderInfo. Clear resets the property values that represent the response headers to their default empty values, including
Location and
Server. Clear also resets the values in the
ProxyAuthenticate and
WWWAuthenticate properties by calling their respective Clear methods. Clear calls the inherited Clear method prior to exiting the method.
Constructor for the object instance.
constructor Create; override;
Description
Create is the constructor for the object instance. Create initializes the object instances used to represent the
WWWAuthenticate and
ProxyAuthenticate properties prior to calling the inherited Create method. Create also calls
Clear to insure that header properties contain their default empty values.
Frees the object instance.
destructor Destroy; override;
Description
Destroy is the destructor for the object instance. Destroy frees the object instances used to represent the
WWWAuthenticate and
ProxyAuthenticate properties. Destroy calls the inherited Destroy method prior to exiting the method.
Loads headers values into their object properties.
procedure ProcessHeaders; override;
Parameters
Headers
Header names and values to be processed.
Description
ProcessHeaders is an overridden procedure that load the header names and values in Headers into their corresponding object properties. RawHeaders is updated to contain the initial data in Headers. Values in Headers are assigned to the corresponding property, and subsequently removed the
TIdHeaderList.
ProcessHeaders determines the values for ContentRangeStart and ContentRangeEnd when Headers contains the 'Range' header. ProcessHeaders also adds the 'WWW-Authenticate' header to the WWWAuthenticate object property, and the 'Proxy-Authenticate' header to the ProxyAuthenticate object property.
ProcessHeaders calls the inherited ProcessHeaders method to allow handing of Entity headers, and headers that are stored in ExtraHeaders.