Libraries
Http response Source Code
 previous   up   next 

Types
httpResponseData
Data type describing the data source of a web server.

httpResponseData

const type: httpResponseData

Data type describing the data source of a web server. It descibes the directory with the HTML files (usually htdocs), the directory with the CGI programs (usually cgi-bin) and the file system where the files are found. Additionally it defines also which directory from a HTTP request should be interpreted as CGI directory.


Function Summary
httpResponseData
httpResponseData (in string: htdocs, in string: cgiDir, in string: cgiName, inout fileSys: backendSys)
Create a web server data source from the given parameters.
void
processGet (inout httpResponseData: responseData, inout httpRequest: request)
Process a GET request and send a response to the request destination.
void
processPost (in httpResponseData: responseData, inout httpRequest: request)
Process a POST request and send a response to the request destination.

Function Detail

httpResponseData

const func httpResponseData: httpResponseData (in string: htdocs, in string: cgiDir, in string: cgiName, inout fileSys: backendSys)

Create a web server data source from the given parameters.

Parameters:
htdocs - Path of the directory with the HTML files (htdocs directory).
cgiDir - Path of the directory with the CGI programs (cgi-bin directory).
cgiName - Name of the CGI directory in HTTP requests.
backendSys - File system where the htdocs and cgiDir files are found.
Returns:
a httpResponseData value with the given parameters.

processGet

const proc: processGet (inout httpResponseData: responseData, inout httpRequest: request)

Process a GET request and send a response to the request destination. If the request refers to a CGI the corresponding CGI program is executed.

Parameters:
responseData - The data source of a web server.
request - The httpRequest (GET) to be processed.

processPost

const proc: processPost (in httpResponseData: responseData, inout httpRequest: request)

Process a POST request and send a response to the request destination. If the request refers to a CGI the corresponding CGI program is executed.

Parameters:
responseData - The data source of a web server.
request - The httpRequest (POST) to be processed.


 previous   up   next