From: Fredrik Tolf Date: Fri, 17 Sep 2010 00:59:25 +0000 (+0200) Subject: doc: Added a manpage for callcgi. X-Git-Tag: 0.1~4 X-Git-Url: http://www.dolda2000.com/gitweb/?p=ashd.git;a=commitdiff_plain;h=a74319598f73b0be009f2920d198d40929123303 doc: Added a manpage for callcgi. --- diff --git a/doc/callcgi.doc b/doc/callcgi.doc new file mode 100644 index 0000000..4564279 --- /dev/null +++ b/doc/callcgi.doc @@ -0,0 +1,50 @@ +callcgi(1) +========== + +NAME +---- +callcgi - CGI request handler for ashd(7) + +SYNOPSIS +-------- +*callcgi* [*-c*] [*-p* 'PROGRAM'] 'METHOD' 'URL' 'REST' + +DESCRIPTION +----------- + +*callcgi* serves CGI scripts by translating the *ashd*(7) request +environment into a standard CGI environment and executing the target +file. It needs to be called with the `X-Ash-File` header added to the +request, as *dirplex*(1) does. + +*callcgi* is a transient handler, as defined in *ashd*(7), and the +'METHOD', 'URL' and 'REST' arguments will normally be added by the +parent handler. + +The CGI script is called with its own filename as the first and only +command-line parameter. + +OPTIONS +------- + +*-c*:: + + Change directory to the directory containing the CGI script + before running it. This behavior is encouraged by the CGI + specification, but is not used by *callcgi* by default. + +*-p* 'PROGRAM':: + + Call 'PROGRAM' instead of the file itself. This mechanism can + be used to serve e.g. PHP scripts and other programs that have + an interpreter that can act as a CGI script. The filename of + the actual script is still passed as the first and only + command-line parameter to the program. + +AUTHOR +------ +Fredrik Tolf + +SEE ALSO +-------- +*dirplex*(1), *ashd*(7), RFC 3875