Request Specific

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 NameDescriptionFormatExample
SERVER_PROTOCOLThe name and revision of the protocol type with which the web server accepted the form data.protocol/revisionHTTP/1.0
SERVER_PORTThe port number on which the web server accepted the request.  
REQUEST_METHODHow this form was submitted. One of "GET", "POST" or "HEAD".  
PATH_INFOExtra path information as given by the client. Decoded by server before being passed to the CGI program. Not useful.  
PATH_TRANSLATEDTranslated path information. Not useful.  
SCRIPT_NAMEA virtual path to the CGI program being executed. The program can use this to make a self-referencing URL. Not extremely useful.  
QUERY_STRINGThe data after the '?' in the URL which referenced the CGI program. This is the form data from a GETed form.  
REMOTE_HOSTThe 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_ADDRThe IP address of the client accessing the CGI program.  
AUTH_TYPEThe 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_USERThe 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_TYPEThe MIME-type of the data being transfered from a PUT form.type/subtypetext/x-www-form
CONTENT_LENGTHThe length of the form data on standard input. 261