HTTP Variables
Note
Indexing Service is no longer supported as of Windows XP and is unavailable for use as of Windows 8. Instead, use Windows Search for client side search and Microsoft Search Server Express for server side search.
Several variables in HTML extension files can give a lot of information about the environment and Web client connected to the server. In addition, all headers sent by the client are available. For Indexing Service to access these headers, you must convert them:
- Add HTTP_ to the beginning.
- Convert all hyphens to underscores.
- Convert all letters to uppercase.
The following list gives a listing of default variables.
-
ALL_HTTP
-
All HTTP headers that were not already parsed into one of the listed variables. These variables are of the form HTTP_header field name with successive variables separated by a new line character, for example:
HTTP_ACCEPT: */*, q=0.300, audio/x-aiff, audio/basic, image/jpeg, image/gif, text/plain, text/html
HTTP_USER_AGENT: Microsoft Internet Explorer/0.1 (Win32)
HTTP_REFERER: http://webserver/samples/dbsamp/dbsamp3.htm
HTTP_CONTENT_TYPE: application/x-www-form-urlenPRE: 10
HTTP_EXTENSION: Security/Digest
-
AUTH_TYPE
-
The type of authorization in use. If the user name has been authenticated by the server, this will contain Basic. NTLM returns the value Negotiate. Otherwise, it will not be present.
-
CONTENT_LENGTH
-
The number of bytes that the script can expect to receive from the client.
-
CONTENT_TYPE
-
The content type of the information supplied in the body of a request by a POST variable.
-
GATEWAY_INTERFACE
-
The revision of the CGI specification with which this server complies. The current version is Common Gateway Interface 1.1.
-
HTTP_ACCEPT
-
Special-case HTTP header. Values of the Accept: fields are concatenated, separated by ", "; for example, if the following lines are part of the HTTP header: accept: */*; q=0.1 accept: text/html accept: image/jpeg then the HTTP_ACCEPT variable will have a value of: */*; q=0.1, text/html, image/jpeg.
-
PATH_INFO
-
Additional path information, as given by the client. This comprises the trailing part of the URL after the script name but before the query string (if any).
-
PATH_TRANSLATED
-
This is the value of PATH_INFO, but with any virtual path name expanded into a directory specification.
-
QUERY_STRING
-
The information that follows the question mark (?) in the URL that referenced this script.
-
REMOTE_ADDR
-
The IP address of the client.
-
REMOTE_HOST
-
The host name of the client.
-
REMOTE_USER
-
This contains the user name supplied by the client and authenticated by the server.
-
REQUEST_METHOD
-
The HTTP request method.
-
SCRIPT_NAME
-
The name of the script program being run.
-
SERVER_NAME
-
The server’s host name (or IP address) as it should appear in self-referencing URLs.
-
SERVER_PORT
-
The TCP/IP port on which the request was received.
-
SERVER_PROTOCOL
-
The name and version of the information-retrieval protocol relating to this request, usually HTTP 1.0.
-
SERVER_SOFTWARE
-
The name and version of the web server under which the Internet Server Extension is running.