Variable | Value |
---|---|
Description | |
AUTH_TYPE | [undefined] |
Protocol-specific authentication method used to validate the user. | |
CONTENT_LENGTH | [undefined] |
Length of the data passed to the CGI program through STDIN; implies REQUEST_METHOD is "POST". | |
CONTENT_TYPE | [undefined] |
For queries which have attached information, such as HTTP POST and PUT, this is the MIME content type of the data. | |
DOCUMENT_ROOT | [undefined] |
The directory from which web documents are served. | |
GATEWAY_INTERFACE | CGI/1.1 |
CGI specification revision number to which server complies. | |
HTTP_ACCEPT | */* |
List of the MIME types that the client can accept. | |
HTTP_CONNECTION | close |
[unanticipated] | |
HTTP_COOKIE | [undefined] |
Cookie values. [See Cookie Demo.] | |
HTTP_FROM | [undefined] |
The Email address of the user making the request. [Most browsers do not support this variable.] | |
HTTP_HOST | cgi-int.tripod.com |
[unanticipated] | |
HTTP_REFERER | https://ruevs2.tripod.com/cgi-bin/ environment.cgi |
The URL of the document that the client pointed to before accessing the CGI program. | |
HTTP_USER_AGENT | Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com) |
The browser the client is using. | |
PATH_INFO | [undefined] |
Extra path information, as given by the client. | |
PATH_TRANSLATED | [undefined] |
Server-provided version of PATH_INFO (with virtual-to-physical mapping). | |
QUERY_STRING | [undefined] |
Query information passed to the program following URL and "?"; implies REQUEST_METHOD is "GET". | |
REMOTE_ADDR | 10.126.24.9 |
IP address of remote host making the request. | |
REMOTE_HOST | [undefined] |
Remote hostname making the request. | |
REMOTE_IDENT | [undefined] |
If the HTTP server supports RFC 931 identification, then this variable will be set to the remote username retrieved from the server. Usage of this variable should be limited to logging only. | |
REMOTE_USER | [undefined] |
Authenticated username (see AUTH_TYPE). | |
REQUEST_METHOD | GET |
The method with which the request was made (e.g., "GET" or "POST" or "HEAD"). | |
REQUEST_URI | /ruevs2/cgi-bin/environment.cgi |
[unanticipated] | |
SCRIPT_NAME | /environment.cgi |
Virtual path to the script being executed (used for self-referencing URLs). | |
SERVER_ADMIN | ops@tripod.com |
[unanticipated] | |
SERVER_NAME | cgi-int.tripod.com |
Server host name, DNS alias, or IP address (as it would appear in self-referencing URLs). | |
SERVER_PORT | 80 |
Port number the request was sent to (i.e., the host on which the server is running). | |
SERVER_PROTOCOL | HTTP/1.1 |
Name and revision of the information protocol this request came in with. | |
SERVER_SOFTWARE | [undefined] |
Name and version of the server software answering the request. |
One way to invoke a Perl program is with an HTML <A HREF=...>...</A> link. Parameters are passed to Perl after the URL and a ?. Try it...
Hit me: /cgi-bin/environment.cgi?foo=1&bar=2
When this page reappears, you should see
REQUEST_METHOD of "GET".
The parameter names and values arrive via QUERY_STRING,
and should be "foo=1&bar=2".
POST
Another way to invoke a Perl program is with an HTML <FORM METHOD=post> tag, one or more <INPUT> tags, and an <INPUT TYPE=submit> tag. Try it...
When this page reappears, you should see REQUEST_METHOD of "POST". The parameter names and values arrive via STDIN, and would be something like "foo=1&bar=2". CONTENT_LENGTH will be set to the length of that string. CONTENT_TYPE will be something like "application/x-www-form-urlencoded".
You are visitor since 18 August 1996
Copyright © 1996-1997 Rex Swain
Email rex@rexswain.com,
Web
http://www.rexswain.com/
Permission granted to distribute unmodified copies
Reports of errors or omissions appreciated