The following are request-specific; they will only be set if they are pertinent to the request being sent.
Table A-2. Request-specific variables
| Variable Name | Description | Format | Example |
|---|---|---|---|
| SERVER_PROTOCOL | The name and revision of the protocol type with which the web server accepted the form data. | protocol/revision | HTTP/1.0 |
| SERVER_PORT | The port number on which the web server accepted the request. | ||
| REQUEST_METHOD | How this form was submitted. One of "GET", "POST" or "HEAD". | ||
| PATH_INFO | Extra path information as given by the client. Decoded by server before being passed to the CGI program. Not useful. | ||
| PATH_TRANSLATED | Translated path information. Not useful. | ||
| SCRIPT_NAME | A virtual path to the CGI program being executed. The program can use this to make a self-referencing URL. Not extremely useful. | ||
| QUERY_STRING | The data after the '?' in the URL which referenced the CGI program. This is the form data from a GETed form. | ||
| REMOTE_HOST | The hostname of the client accessing the CGI program. If a hostname does not exist for the client's machine, this will be left unset. | ||
| REMOTE_ADDR | The IP address of the client accessing the CGI program. | ||
| AUTH_TYPE | The type of authentication the user had to go through to get to the CGI program. If the user did not go through authentication [as is often the case], this will be left unset. | ||
| REMOTE_USER | The identity the user authenticated with, if authentication was necessary to get to the CGI program. If the user did not authenticate, this will be left unset. | ||
| REMOTE_IDENT | "If the HTTP server supports RFC 931 identification, then this variable will be set to the remote user name retrieved from the server. Usage of this variable should be limited to logging only." - http://hoohoo.ncsa.uiuc.edu/cgi/env.html. Not useful, usually not set. | ||
| CONTENT_TYPE | The MIME-type of the data being transfered from a PUT form. | type/subtype | text/x-www-form |
| CONTENT_LENGTH | The length of the form data on standard input. | 261 |