Internet Direct (Indy) Version 9.0.2 Beta
|
property Host: string;
When Host does not contain a trailing port number, it is implied that the default TIdHTTP.Port number will be used for the service requested. For example, a request to the origin server for http://www.w3.org/pub/WWW/ could include the following value in Host:
Host: www.w3.org:80
A value must be included in Host for all HTTP/1.1 request messages. If the requested URI in TIdHTTP.URL does not include an Internet host name for the service being requested, then the Host property for the request must be given with an empty value.
The most common form of Request-URI is that used to identify a resource on an origin server or gateway using a relative path specifier. In this case the path in TIdHTTP.URL would contain the absolute path, and the Host property for the request must include the network location or server identity. For example, a client wishing to retrieve the resource identitifed using the path 'www.w3.org/pub/WWW/TheProject.html' would result in a request containg the following:
IdHTTP.URL.URI contains '/pub/WWW/TheProject.html'; IdHTTP.Request.Host contains 'www.w3.org';
Host is updated when TIdHTTP prepares the HTTP request for transmission to the remote server.