A simple "transaction" manager for CGI. html-client transac-manager cgi | | | | | / |--------(initial-request)------->| / | |-----initialrequest(sessid)----->| | | | | |<------reply(sessid,trid)--------| |<-------(html-form)--------------| / | / | | / |----------(action.get)---------->| / | |----request(sesid,trid,data)---->| | | | | |<------reply(sessid,trid+1)------| |<-------(html-form)--------------| / | / | | | | V V V In this implementation transac-manager and cgi are linked together in the CGI process and this CGI process lives from the HTML request to the response. License: AGPL3 Copyright Pascal J. Bourguignon 2003 - 2012 This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>
(action program) |
generic-function |
A string naming the action used in the HTML forms.
(allowed-nets program) |
generic-function |
A list of (ip-address ip-mask).
(arguments program) |
generic-function |
A list of command-line arguments.
(body-attributes program) |
generic-function |
A list containing the HTML:BODY attributes.
(environment program) |
generic-function |
An a-list of unix environment variables: (var . value)*
(generate-html-footer self session-id) |
generic-function |
A hook allowing the hprogram to display a footer. It should not generate a form with the same action!
(generate-html-header self session-id) |
generic-function |
A hook allowing the hprogram to display a header. It should not generate a form with the same action!
(getcmds trans-data) |
function |
RETURN: A list of commands appearing in TRANS-DATA. NOTE: Normaly, only one command is present. But if the GET url is hacked, zero or multiple commands may be present.
hprogram |
class |
An abstract class of a HTML Transaction Program. This is the interface used by the HTRANS package to communicate with it.
Class precedence list: HPROGRAM STANDARD-OBJECT T
Class init args: ARGUMENTS ENVIRONMENT ALLOWED-NETS REFUSED-NETS ACTION TITLE BODY-ATTRIBUTES
(process-request self session-id trans-id trans-data) |
generic-function |
A call-back function (hprogram session-id trans-id data) that will be called with the decoded request.
(process-transaction htp) |
generic-function |
DO: Parses the CGI request and calls the REQUEST function passing it the session-id, transaction-id and request data. For the initial request, transaction-id and request data will be NIL. NOTE: Begins by outputing the HTML header and ends with the HTML footer.
(refuse-remote self session-id remote-ip) |
generic-function |
A call-back function called to display a message indicating that the remote was refused access for it's IP address.
(refuse-session self session-id) |
generic-function |
A call-back function called to display a message indicating that the session-id is bad.
(refused-nets program) |
generic-function |
A list of (ip-address ip-mask).
(send-reply htp session-id transac-id title data commands) |
generic-function |
DO: Sends a reply page.
(send-table htp session-id transac-id title row-desc data commands) |
generic-function |
DO: Sends a table.
(title program) |
generic-function |
A string used as page title.