sunet/doc/latex/cgi-script.tex

22 lines
780 B
TeX

\chapter{CGI scripts}\label{cha:cgi-scripts}
%
\begin{description}
\item[Used files:] cgi-script.scm
\item[Name of the package:] cgi-script
\end{description}
%
\section{Procedures}
\begin{defundesc}{cgi-form-query}{}{data-alist}
CGI scripts receive their parameters in various ways, depending on
how they were called (e.g. by ``GET'' method). 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} (``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}