Documentation for Module: cgi.r ||  Module Index

syntax: !overview CGI-oriented functions and the CGI object.
author: Tim Johnson tim@akwebsoft.com

Global Index
cgi-header get-html-response get-http-response-object method pre
cgi? get-html-target      

Context Index
cgi Functions: ==>
PUBLIC VARIABLES get-domain name read-post-data set-prev-path-info
cgi get-referrer name? referrer testing?
close get-referring-domain names remake url
debug getrec parts rename usage
decode-multipart init path reset values
dump inspect previous script write
get inspect put set-default-value __dict__

Global function documentation

Function: cgi-headerTopGlobals IndexContext IndexNext
    syntax: cgi-header Print cgi mime-type
Function: cgi?TopGlobals IndexContext IndexBackNext
    syntax: cgi? Are we in cgi mode?
Function: get-html-responseTopGlobals IndexContext IndexBackNext
    syntax: get-html-response <URL> Get HTML response headers.
    refinement: /with Get single header attribute
Function: get-html-targetTopGlobals IndexContext IndexBackNext
    syntax: get-html-target <URL> Get the HTML response target
Function: get-http-response-objectTopGlobals IndexContext IndexBackNext
    syntax: get-http-response-object <URL> Get the HTTP response object for inspection.
Function: methodTopGlobals IndexContext IndexBackNext
    syntax: cgi/method <arg-list>
    descriptive: Interacts with the CGI environment
Function: preTopGlobals IndexContext IndexBack
    syntax: pre Print preformat tag alternating open and closing

Global function documentation

Context: cgi

Public Variables Of: cgiTopContext IndexGlobals IndexNext Function
    syntax: Public_Variables
    last-request: name for last value requestion by value subroutine
    abort: Set to prepare for object about
    getting-upload: In file mode. Getting an uploaded file
    referring-domain: Domain that requested the CGI url
    keep-hit-log: Tally hits
    default-value: Value returned by CGI object if none found
    on: Set to true when object is finished initializing
    ports: Associative Block of open ports
    data: Data structure holding parsed name/value pairs
    pairs: Length of data - number of key values
    path-thru: path to and including the script that calls this object
    path-to: path TO the script name
    path-full: path TO the script name AND including path-info
    prev-path-info: path info of refering document
    script-name: the name of the script
    folder: name of the directory of the script
    remote-addr: name of client acessing script
    testing: is it run from localhost? or from local machine
    TestServers: set block of testing Servers
    local-IP: first octets for private networks
    path-info: Block of virtual path parts parsed on "/"
    domain: Domain of the script
    content-length: Length of request in bytes
Function: cgi/cgiTopContext IndexGlobals IndexPrevious FunctionNext Function
    syntax: cgi <block> sets a cgi value
Function: cgi/closeTopContext IndexGlobals IndexPrevious FunctionNext Function
    syntax: cgi/close Shut down resources. Use at end of script
Function: cgi/debugTopContext IndexGlobals IndexPrevious FunctionNext Function
    syntax: cgi/debug <word> <val> Store debug stub
Function: cgi/decode-multipartTopContext IndexGlobals IndexPrevious FunctionNext Function
    syntax: cgi/decode-multipart Decode multipart data stream
Function: cgi/dumpTopContext IndexGlobals IndexPrevious FunctionNext Function
    syntax: cgi/dump
    description: Inspect environment, use from dbg.
    write CGI data to debug file /out, print
Function: cgi/getTopContext IndexGlobals IndexPrevious FunctionNext Function
    syntax: cgi/get Alias for value. Nice to use!
Function: cgi/get-domainTopContext IndexGlobals IndexPrevious FunctionNext Function
    syntax: cgi/get-domain Domain of current script
Function: cgi/get-referrerTopContext IndexGlobals IndexPrevious FunctionNext Function
    syntax: cgi/get-referrer URL of referrer. Not trustable in internet
Function: cgi/get-referring-domainTopContext IndexGlobals IndexPrevious FunctionNext Function
    syntax: cgi/get-referring-domain Domain of referrer. Not trustable in internet
Function: cgi/getrecTopContext IndexGlobals IndexPrevious FunctionNext Function
    syntax: cgi/getrec <block> Get multiple values as block of alternate keys and values
    refinement: /warn - Throw error if no match
Function: cgi/initTopContext IndexGlobals IndexPrevious FunctionNext Function
    syntax: cgi/init set up CGI object
Function: cgi/inspectTopContext IndexGlobals IndexPrevious FunctionNext Function
    syntax: cgi/inspect brief dump of data.
    syntax: cgi/inspect Verbose dump of data.
Function: cgi/inspectTopContext IndexGlobals IndexPrevious FunctionNext Function
    syntax: cgi/inspect brief dump of data.
    syntax: cgi/inspect Verbose dump of data.
Function: cgi/nameTopContext IndexGlobals IndexPrevious FunctionNext Function
    syntax: cgi/name <str-key> Find a name:
    description:
      First character:
        ^: any name in data where key matches head of name ('escape' as ^^)
        *: any name in data where key found in name
        $: any name in data where key matches end of name
    syntax: (cgi/value <word-str-int-key>)
    Description: Retrieve either a value (word or string key) or a path part (int)
    refinement: /full - Look for redundant key/value pairs
Function: cgi/name?TopContext IndexGlobals IndexPrevious FunctionNext Function
    syntax: cgi/name? <str-word-key> Does a name exist?
Function: cgi/namesTopContext IndexGlobals IndexPrevious FunctionNext Function
    syntax: cgi/names Find a series of names.
    refinement: all names in data
    refinement: any name in data where key1 matches head of name
    refinement: any name in data where key2 found in name
Function: cgi/partsTopContext IndexGlobals IndexPrevious FunctionNext Function
    syntax: cgi/parts Number of components of path-info
Function: cgi/pathTopContext IndexGlobals IndexPrevious FunctionNext Function
    syntax: cgi/path retrieve subset of script path
    refinement: /part <int-block-indexes> Get all components requested
    refinement: /info block of virtual path components
    refinement: /thru path to end of script name
    refinement: /to path to script name
    refinement: /full complete path (with path parts)
Function: cgi/previousTopContext IndexGlobals IndexPrevious FunctionNext Function
    syntax: cgi/previous Full path of referrer. Not trustable in internet
Function: cgi/putTopContext IndexGlobals IndexPrevious FunctionNext Function
    syntax: cgi/put change the value found by name to val. If not found, add name and value
Function: cgi/read-post-dataTopContext IndexGlobals IndexPrevious FunctionNext Function
    internal: self/read-post-data Read date sent by a post method
Function: cgi/referrerTopContext IndexGlobals IndexPrevious FunctionNext Function
    syntax: cgi/referrer URL of referrer. Not trustable in internet
Function: cgi/remakeTopContext IndexGlobals IndexPrevious FunctionNext Function
    syntax: cgi/remake
    Description: Recreates the current state of the CGI environment as script path
     with appended query string. (regardless of "get" or "post" method)
     If put has NOT been used to changed content of data, recreates original state
    Note: Called by cgi/url with no refinement
Function: cgi/renameTopContext IndexGlobals IndexPrevious FunctionNext Function
    syntax: cgi/rename <str-name> <str-newname> change name to newname
Function: cgi/resetTopContext IndexGlobals IndexPrevious FunctionNext Function
    syntax: cgi/reset <word-str-key>
    description: If a key exists, change the value, if not add key/value pair
Function: cgi/scriptTopContext IndexGlobals IndexPrevious FunctionNext Function
    syntax: cgi/script Return script name
Function: cgi/set-default-valueTopContext IndexGlobals IndexPrevious FunctionNext Function
    syntax: cgi/set-default-value <val> Return values when key match not made.
Function: cgi/set-prev-path-infoTopContext IndexGlobals IndexPrevious FunctionNext Function
    syntax: cgi/set-prev-path-info set prev-path-info to that of HTTP_REFERER
    Note:: HTTP_REFERER is not reliable in the open WWWeb
Function: cgi/testing?TopContext IndexGlobals IndexPrevious FunctionNext Function
    syntax: cgi/testing? are we testing?
    Return: true if server-name matches list of test machines
Function: cgi/urlTopContext IndexGlobals IndexPrevious FunctionNext Function
    syntax: cgi/url Without refinement - reconstruct as GET URL. See remake
    refinement: /to to the script name
    refinement: /thru to the end of the script name
    refinement: /full to the end of path-info
    refinement: /other any non-script URL
Function: cgi/usageTopContext IndexGlobals IndexPrevious FunctionNext Function
    syntax: cgi/usage Prints out usage. Probably needs updating.
    Possibly could be eliminated
Function: cgi/valuesTopContext IndexGlobals IndexPrevious FunctionNext Function
    syntax: cgi/values Find series of values
    refinement: /all all values in data
    refinement: /any any value in data where key1 matches head of name
    refinement: /every any value in data where key2 found in name
    refinement: /last any value in data where key3 matches tail of name
Function: cgi/writeTopContext IndexGlobals IndexPrevious FunctionNext Function
    syntax: cgi/write <val> Send formatted value to debug file
Function: cgi/__dict__TopContext IndexGlobals IndexPrevious Function
    syntax: cgi/__dict__ get the names of the object members