Cleaned up some.

This commit is contained in:
sperber 2003-01-22 10:47:22 +00:00
parent 3fb74214f8
commit 5721a3ec3c
1 changed files with 20 additions and 17 deletions

View File

@ -1,21 +1,24 @@
\chapter{CGI scripts}\label{cha:cgi-scripts} \chapter{Writing CGI Scripts in Scheme}\label{cha:cgi-scripts}
% %
\begin{description} The \ex{cgi-scripts} structure provides functionality useful for
\item[Used files:] cgi-script.scm writing CGI scripts in Scheme.
\item[Name of the package:] cgi-script
\end{description}
%
\section{Procedures}
\begin{defundesc}{cgi-form-query}{}{data-alist} \defun{cgi-form-query}{}{data-alist}
\begin{desc}
CGI scripts receive their parameters in various ways, depending on CGI scripts receive their parameters in various ways, depending on
how they were called (e.g. by ``GET'' method). This procedure how they were called (e.g.\ by \ex{GET} method).
translates the delivered form data into an alist of decoded strings,
using the environment variables set by the server
(\ex{REQUEST\_METHOD}, \ex{QUERY\_STRING} (``GET'' script),
\ex{CONTENT\_LENGTH} (``POST'' script)). So a query string like
\codex{button=on\&\ob{}reply=Oh,\ob{}\%20yes} becomes alist
\codex{(("button" . "on") ("reply" . "Oh, yes"))} This only works for
GET and POST methods.
\end{defundesc}
This procedure translates the delivered form data into an alist of
decoded strings, using the environment variables set by the server
(\ex{REQUEST\_METHOD}, \ex{QUERY\_STRING} (for a \ex{GET} request),
\ex{CONTENT\_LENGTH} (for a \ex{POST} request)). So a query string
like \codex{button=on\&\ob{}reply=Oh,\ob{}\%20yes} becomes an alist
\codex{(("button" . "on") ("reply" . "Oh, yes"))}.
\ex{Cgi-form-query} only works for \ex{GET} and \ex{POST} methods.
\end{desc}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "man"
%%% End: