about summary refs log tree commit diff stats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/localcgi.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/localcgi.md b/doc/localcgi.md
index 2d15e6af..206a3ef7 100644
--- a/doc/localcgi.md
+++ b/doc/localcgi.md
@@ -118,6 +118,9 @@ Chawan sets the following environment variables:
 * `REQUEST_URI="$SCRIPT_NAME/$PATH_INFO?$QUERY_STRING`
 * `REQUEST_METHOD=` HTTP method used for making the request, e.g. GET or POST
 * `REQUEST_HEADERS=` A newline-separated list of all headers for this request.
+* `CHA_LIBEXEC_DIR=` The libexec directory Chawan was configured to use at
+  compile time. See the [tools](#tools) section below for details of
+  why this is useful.
 * `CONTENT_TYPE=` for POST requests, the Content-Type header. Not set for
   other request types (e.g. GET).
 * `CONTENT_LENGTH=` the content length, if $CONTENT_TYPE has been set.
@@ -165,6 +168,18 @@ Note that this may be both an application/x-www-form-urlencoded or a
 multipart/form-data request; `CONTENT_TYPE` stores information about the
 request type, and in case of a multipart request, the boundary as well.
 
+## Tools
+
+Chawan provides certain helper binaries that may be useful for CGI
+scripts. These can be portably accessed by executing
+`"$CHA_LIBEXEC_DIR"/[program name]`.
+
+Currently, the following tools are available:
+
+* `urldec`: percent-decode strings passed on standard input.
+* `urlenc`: percent-encode strings passed on standard input, taking a
+  percent-encode set as the first parameter.
+
 ## Troubleshooting
 
 Note that standard error is redirected to the browser console (by default,