Skip to main content

CGI Environment Variables Passed by the Web Gateway

CGI environment variables are derived both from the client’s HTTP request headers and from the environment in which the web server is operating. The Web Gateway transmits the common environment variables to InterSystems IRIS® with each and every request. If extra environment variables are required by the application, they must be explicitly requested in the Web Gateway configuration (via the Extra CGI Environment Variables setting in the Application Access section of the configuration). In the InterSystems IRIS Management Portal, navigate to System Administration > Configuration > Web Gateway Management and select Application Access.

The list of environment variables transmitted is shown in the table below together with a brief description of each. Further documentation can be obtained from standard web text books.

Environment Variable Value
AUTH_PASSWORD Value entered in the client’s authentication dialog. This variable is available only if Basic authentication is used.
AUTH_TYPE Contains the authentication method that the server uses to validate users when they attempt to access a protected script.
CONTENT_TYPE For requests which have attached information, such as HTTP POST and PUT, this is the content type of the data.
GATEWAY_INTERFACE Revision of the CGI specification to which this server complies. Format: CGI/revision
HTTP_ACCEPT Value of the Accept request header that contains a list of accepted formats (MIME types). For example: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/ The values of the fields for the HTTP_ACCEPT variable are concatenated, and separated by a comma (,).
HTTP_ACCEPT_CHARSET Comma-delimited list of the character encodings that the client accepts.
HTTP_ACCEPT_LANGUAGE Contains a string describing the language to use for displaying content (such as en-us).
HTTP_AUTHORIZATION Contains the Base-64 encoded username, password, scheme and realm sent by the client.
HTTP_COOKIE Holds the contents of the client’s cookie(s).
HTTP_REFERER Holds a string that contains the URL of the page that referred the request to the current page using an HTML <A> tag. Note that the URL is the one that the user typed into the browser address bar, which may not include the name of a default document. If the page is redirected, HTTP_REFERER is empty.
HTTP_SOAPACTION SOAPAction HTTP request header field can be used to indicate the intent of the SOAP HTTP request. The value is a URI identifying the intent. SOAP places no restrictions on the format or specificity of the URI or that it is resolvable. An HTTP client MUST use this header field when issuing a SOAP HTTP Request.
HTTP_USER_AGENT Browser the client is using to send the request. General format: software/version library/version.
HTTPS Set to either On or Off (using word, not numerical value). Set to on if the script is being called through a secure server (that is, using SSL/TLS).
PATH_TRANSLATED Translated version of PATH_INFO, in which any virtual-to-physical mapping is applied to the path.
REMOTE_ADDR IP address of the remote host making the request.
REMOTE_HOST Hostname making the request. If the server does not have this information, it should set REMOTE_ADDR and leave this parameter unset.
REMOTE_IDENT If the HTTP server supports RFC 931 identification, then this variable is set to the remote username retrieved from the server.
REMOTE_USER Name of the user as it is derived from the authorization header sent by the client
REQUEST_METHOD Method with which the request was made. For HTTP, this is GET, HEAD, POST, and so on.
SERVER_NAME The server's hostname, DNS alias, or IP address as it would appear in self-referencing URLs.
SERVER_PORT Port number to which the request was sent. For example: 80
SERVER_PORT_SECURE Set to either 0 or 1. If the request is being handled on the web server’s secure port, then it is set to 1. Otherwise, it is set to 0.
SERVER_PROTOCOL Name and revision of the information protocol that the request came in with. Format: protocol/revision
SERVER_SOFTWARE Name and version of the web server software responding to the request. Format: name/version.
FeedbackOpens in a new tab