Appendix C

Environment Calls


Environment Variables for use in Gateway Programming

Variable Name
Description
AUTH_TYPEThe protocol specific authentication method used to validate the user. It is set when the server supports user authentication.
CONTENT_LENGTHThe length of the content as given by the client.
CONTENT_TYPEThe content type of the data for queries that have attached information (for example, as HTTP POST and PUT).
GATEWAY_INTERFACEThe CGI Specification revision of the server. Format : CGI/revision.
PATH_INFOPath information, as given by the user request.
PATH-TRANSLATEDPath translated version of PATH_INFO, with the path including any virtual-to-physical mapping to it.
QUERY_STRINGThe information following the ? in the URL when referencing the script (using GET).
REMOTE_ADDRThe IP address of the remote (user's) host making the request.
REMOTE_HOSTThe name of the host making the request (user host).
REMOTE_IDENTThis variable is set to the remote user name as retrieved from the server (if the HTTP server supports RFC 931 identification).
REMOTE_USERThis is set to the username if the HTTP server supports RFC 931 identification and the script is protected.
REQUEST_METHODThe method by which the request was made (for example, GET, HEAD, POST, and so on).
SCRIPT_NAMEA pathname of the script to execute.
SERVER_NAMEThe server's hostname, DNS alias, or IP address as it would appear in self-referencing URLs.
SERVER_PORTThe port number where the request was sent.
SERVER_PROTOCOLThe name/revision of the information protocol.
SERVER_SOFTWAREThe name/version of the information server software the answered the request.