aboutsummaryrefslogtreecommitdiffstats
path: root/http-cgi.txi
diff options
context:
space:
mode:
Diffstat (limited to 'http-cgi.txi')
-rwxr-xr-x[-rw-r--r--]http-cgi.txi23
1 files changed, 15 insertions, 8 deletions
diff --git a/http-cgi.txi b/http-cgi.txi
index 0e57933..2d6b38f 100644..100755
--- a/http-cgi.txi
+++ b/http-cgi.txi
@@ -48,9 +48,13 @@ query is a valid @samp{"POST"} or @samp{"GET"} query, then @code{http:serve-quer
and @var{header-alist}. Otherwise, @code{http:serve-query} calls @var{serve-proc} with the
@var{request-line}, #f, and @var{header-alist}.
-If @var{serve-proc} returns a string, it is sent to @var{output-port}. If @var{serve-proc} returns a list,
-then an error page with number 525 and strings from the list. If @var{serve-proc}
-returns #f, then a @samp{Bad Request} (400) page is sent to @var{output-port}.
+If @var{serve-proc} returns a string, it is sent to @var{output-port}. If @var{serve-proc} returns a list
+whose first element is an integer, then an error page with the
+status integer which is the first element of the list and strings
+from the list. If @var{serve-proc} returns a list whose first element isn't an
+number, then an error page with the status code 500 and strings from
+the list. If @var{serve-proc} returns #f, then a @samp{Bad Request} (400) page is
+sent to @var{output-port}.
Otherwise, @code{http:serve-query} replies (to @var{output-port}) with appropriate HTML describing the
problem.
@@ -89,12 +93,15 @@ or @samp{"GET"} query, then @code{cgi:serve-query} calls @var{serve-proc} with t
Otherwise, @code{cgi:serve-query} calls @var{serve-proc} with the @var{request-line}, #f, and
@var{header-alist}.
-If @var{serve-proc} returns a string, it is sent to @code{(current-input-port)}.
-If @var{serve-proc} returns a list, then an error page with number 525 and strings
-from the list. If @var{serve-proc} returns #f, then a @samp{Bad Request} (400)
-page is sent to @code{(current-input-port)}.
+If @var{serve-proc} returns a string, it is sent to @code{(current-ouput-port)}.
+If @var{serve-proc} returns a list whose first element is an integer, then an
+error page with the status integer which is the first element of the
+list and strings from the list. If @var{serve-proc} returns a list whose first
+element isn't an number, then an error page with the status code 500
+and strings from the list. If @var{serve-proc} returns #f, then a @samp{Bad
+Request} (400) page is sent to @code{(current-ouput-port)}.
-Otherwise, @code{cgi:serve-query} replies (to @code{(current-input-port)}) with
+Otherwise, @code{cgi:serve-query} replies (to @code{(current-output-port)}) with
appropriate HTML describing the problem.
@end defun