aboutsummaryrefslogtreecommitdiffstats
path: root/http-cgi.scm
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:06:40 -0800
committerBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:06:40 -0800
commita69c9fb665459e2bfdbda1bf80741a0af31a7faf (patch)
treef0bc974f8805049e6b9a4e6864886298fbaa05a4 /http-cgi.scm
parent4684239efa63dc1b2c1cbe37ef7d3062029f5532 (diff)
downloadslib-upstream.tar.gz
slib-upstream.zip
New upstream version 3b5upstream/3b5upstream
Diffstat (limited to 'http-cgi.scm')
-rwxr-xr-x[-rw-r--r--]http-cgi.scm27
1 files changed, 17 insertions, 10 deletions
diff --git a/http-cgi.scm b/http-cgi.scm
index bc328cf..a6fd493 100644..100755
--- a/http-cgi.scm
+++ b/http-cgi.scm
@@ -125,7 +125,7 @@
*http:byline*
(sprintf
#f
- "<A HREF=http://swiss.csail.mit.edu/~jaffer/SLIB.html>SLIB</A> %s server"
+ "<A HREF=http://people.csail.mit.edu/jaffer/SLIB.html>SLIB</A> %s server"
(if (getenv "SERVER_PROTOCOL") "CGI/1.0" "HTTP/1.0"))))
(string-append (http:status-line status-code reason-phrase)
(http:content
@@ -157,9 +157,13 @@
;;and @var{header-alist}. Otherwise, @0 calls @1 with the
;;@var{request-line}, #f, and @var{header-alist}.
;;
-;;If @1 returns a string, it is sent to @3. If @1 returns a list,
-;;then an error page with number 525 and strings from the list. If @1
-;;returns #f, then a @samp{Bad Request} (400) page is sent to @3.
+;;If @1 returns a string, it is sent to @3. If @1 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 @1 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 @1 returns #f, then a @samp{Bad Request} (400) page is
+;;sent to @3.
;;
;;Otherwise, @0 replies (to @3) with appropriate HTML describing the
;;problem.
@@ -185,7 +189,7 @@
((and (pair? reply) (list? reply))
(if (number? (car reply))
(apply http:error-page reply)
- (apply http:error-page 525 reply)))
+ (apply http:error-page (cons 500 reply))))
(else (http:error-page 500 "Internal Server Error")))))
((not query-string)
(http:error-page 400 "Bad Request" (html:plain request-line)))
@@ -325,12 +329,15 @@
;;Otherwise, @0 calls @1 with the @var{request-line}, #f, and
;;@var{header-alist}.
;;
-;;If @1 returns a string, it is sent to @code{(current-input-port)}.
-;;If @1 returns a list, then an error page with number 525 and strings
-;;from the list. If @1 returns #f, then a @samp{Bad Request} (400)
-;;page is sent to @code{(current-input-port)}.
+;;If @1 returns a string, it is sent to @code{(current-ouput-port)}.
+;;If @1 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 @1 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 @1 returns #f, then a @samp{Bad
+;;Request} (400) page is sent to @code{(current-ouput-port)}.
;;
-;;Otherwise, @0 replies (to @code{(current-input-port)}) with
+;;Otherwise, @0 replies (to @code{(current-output-port)}) with
;;appropriate HTML describing the problem.
(define (cgi:serve-query serve-proc)
(let* ((script-name (getenv "SCRIPT_NAME"))