2002-08-21 10:52:34 -04:00
|
|
|
\chapter{CGI scripts}\label{cha:cgi-scripts}
|
2002-02-12 06:50:54 -05:00
|
|
|
%
|
|
|
|
\begin{description}
|
|
|
|
\item[Used files:] cgi-script.scm
|
|
|
|
\item[Name of the package:] cgi-script
|
|
|
|
\end{description}
|
|
|
|
%
|
2002-08-21 10:52:34 -04:00
|
|
|
\section{Procedures}
|
2002-04-14 13:04:26 -04:00
|
|
|
|
|
|
|
\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}
|
|
|
|
|