Libraries
Cgi Source Code
 previous   up   next 

Function Summary
hash [string] string
getCgiParameters (in string: paramStri)
Read the CGI parameters from the given paramStri.
hash [string] string
getCgiParameters (inout file: inFile)
Read the CGI parameters from the given file inFile.

Function Detail

getCgiParameters

const func hash [string] string: getCgiParameters (in string: paramStri)

Read the CGI parameters from the given paramStri. The parameter paramStri is assumed to consist of of elements separated with ampersands. Individual elements can have the form name=value or just name without = sign (in this case value is assumed to be ""). Name and value may be percent-encoded. Both are decoded and afterwards possible UTF-8 encodings are also decoded. The final values are entered into the hash table. A CGI script can use the environment variable QUERY_STRING as actual parameter for paramStri. Web servers usually assign the URL part after the '?' character to QUERY_STRING.

Parameters:
paramStri - Percent encoded query string.
Returns:
a hash table containing CGI parameters as key, value pairs.

getCgiParameters

const func hash [string] string: getCgiParameters (inout file: inFile)

Read the CGI parameters from the given file inFile. The standard input file IN can be used as actual parameter for inFile.

Returns:
a hash table containing CGI parameters as key, value pairs.


 previous   up   next