Module "HtmlCgi.curry"

Library to support CGI programming in the HTML library. It is only intended as an auxiliary library to implement dynamic web pages according to the HTML library. It contains a simple script that is installed for a dynamic web page and which sends the user input to the real application server implementing the application.

Author: Michael Hanus

Version: November 2007


 Exported names:

Datatypes:
CgiServerMsg

Constructors:
CgiSubmit | CleanServer | GetLoad | ShowStatus | SketchHandlers | SketchStatus | StopCgiServer

Functions:
cgiServerRegistry | noHandlerPage | readCgiServerMsg | registerCgiServer | runCgiServerCmd | unregisterCgiServer


 Summary of exported functions:

readCgiServerMsg  :: Handle -> IO (Maybe CgiServerMsg)  deterministic 
          Reads a line from a handle and check whether it is a syntactically correct cgi server message.
runCgiServerCmd  :: String -> CgiServerMsg -> IO ()  deterministic rigid
          Executes a specific command for a cgi server.
noHandlerPage  :: String -> String -> String  deterministic rigid
          
cgiServerRegistry  :: String  deterministic 
          The name of the file to register all cgi servers.
registerCgiServer  :: String -> String -> IO ()  deterministic 
          
unregisterCgiServer  :: String -> IO ()  deterministic 
          

 Imported modules:

CPNS
Char
Directory
IO
IOExts
NamedSocket
Prelude
ReadNumeric
ReadShowTerm
System
Time

 Exported datatypes:

CgiServerMsg

The messages to comunicate between the cgi script and the server program. CgiSubmit env cgienv nextpage - pass the environment and show next page, where env are the values of the environment variables of the web script (e.g., QUERY_STRING, REMOTE_HOST, REMOTE_ADDR), cgienv are the values in the current form submitted by the client, and nextpage is the answer text to be shown in the next web page

Constructors:

CgiSubmit :: [(String,String)] -> [(String,String)] -> CgiServerMsg
GetLoad :: CgiServerMsg

GetLoad - get info about the current load of the server process

SketchStatus :: CgiServerMsg

SketchStatus - get a sketch of the status of the server

SketchHandlers :: CgiServerMsg

SketchHandlers - get a sketch of all event handlers of the server

ShowStatus :: CgiServerMsg

ShowStatus - show the status of the server with all event handlers

CleanServer :: CgiServerMsg

CleanServer - clean up the server (with possible termination)

StopCgiServer :: CgiServerMsg

StopCgiServer - stop the server



 Exported functions:

readCgiServerMsg :: Handle -> IO (Maybe CgiServerMsg)  deterministic 

Reads a line from a handle and check whether it is a syntactically correct cgi server message.


runCgiServerCmd :: String -> CgiServerMsg -> IO ()  deterministic rigid

Executes a specific command for a cgi server.


noHandlerPage :: String -> String -> String  deterministic rigid


cgiServerRegistry :: String  deterministic 

The name of the file to register all cgi servers.

Further infos:
  • solution complete, i.e., able to compute all solutions

registerCgiServer :: String -> String -> IO ()  deterministic 


unregisterCgiServer :: String -> IO ()  deterministic 



Generated by CurryDoc (Version 0.4.1 of June 7, 2007) at Nov 9 18:03:14 2009