Using CGI Variables

Common Gateway Interface (CGI) is a standard interface used between external applications and HTTP servers. Domino uses CGI programs to parse data sent by the browser into CGI variables to collect data about the user. Most CGI variables available are listed and explained in Table 16.14. For a complete list of CGI variables, refer to Designer help. Domino enables you to access CGI variables in two ways:

  • Create a field with the CGI variable as its name.

  • Create an agent whose code contains a CGI variable as a DocumentContext property.

Table 16.14. CGI Variable Field Names Table
Field nameReturns
Auth_TypeThe type of authentication used when a user validates. For basic authentication on the Web, this CGI variable will return the value Basic.
Gateway_InterfaceReturns the value of the CGI version.
HTTP_AcceptReturns a list of MIME types the client accepts.
HTTP_Accept_languageReturns the language the browser accepts.
HTTP_RefererThe URL the client used to obtain this element.
HTTPSIndicates whether SSL mode is ON or OFF.
HTTPS_CLIENT_CERT_COMMON_NAMEIf SSL is ON, will return the common name listed on the x.509 certificate.
HTTPS_CLIENT_CERT_ISSUER_COMMON_NAMEIf SSL is ON, will return the who issued the x.509 certificate.
HTTP_User_AgentThe browser that the client is using to send the request.
Path_InfoReturns the path portion of the URL.
Path_Info_DecodedIf the URL was encoded, this CGI variable decodes the path portion of the URL string into regular text.
Query_StringReturns the URL from the action on or everything after the question mark (?). URLs are generated with an exclamation mark (!) rather than a question mark (?) if you allow search engines to search your Web site. Domino recognizes both.
Query_String_DecodedIf the URL was encoded, this CGI variable decodes the Query_String portion of the URL into regular text. This CGI variable is used in Domino applications only.
Remote_AddrThe IP address from which the request is coming.
Remote_UserReturns name of user if the user authenticated.
Request_ContentHolds the information sent with an HTTP POST request. This CGI variable is used for agents only.
Request_MethodReturns the method the request is using, such as GET or POST.
Server_NameReturns the server's hostname, DNS alias, or IP address.
Server_ProtocolThe name and revision of the protocol used in the URL such as HTTP/1.1.
Server_PortThe port the URL request uses. 80 is the default port for HTTP.
Server_SoftwareThe software the server is using to run the CGI programs. An example return value would be Lotus-Domino.

Table 16.15 lists and explains an example of what a field named HTTP_USER_AGENT would return.

Table 16.15. Reserved Field Names
ReturnedBrowser
MSIEMicrosoft Internet Explorer 4 or later
Mozilla 3.xNetscape Navigator 3.x
Mozilla 4.xNetscape Navigator 4.x
Mozilla 5.xNetscape Navigator 6.x

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.194.251