* map socket inport to handler inport (allows POST requests)

* remove FIXME from seval
* add seval example to example web-server
This commit is contained in:
interp 2002-08-28 15:56:14 +00:00
parent d3bf493454
commit 57c6710012
5 changed files with 33 additions and 5 deletions

View File

@ -157,9 +157,12 @@
(decline))))
(lambda ()
(let* ((req (parse-http-request sock options))
(response ((httpd-options-path-handler options)
(response
(with-current-input-port
(socket:inport sock)
((httpd-options-path-handler options)
(http-url:path (request:url req))
req)))
req))))
(values req response)))))
(lambda (req response)

View File

@ -134,7 +134,6 @@
(string-length cl-str)))
0)) ; All whitespace?? -- WTF.
(qs (read-string cl)) ; Read in CL chars,
;; FIXME where is the input port?
(q (parse-html-form-query qs)) ; and parse them up.
(s (cond ((assoc "program" q) => cdr)
(else (signal 'seval-no-program)))))

View File

@ -8,6 +8,7 @@
Following files are available:
<ul>
<li><a href=../cgi-bin/comments.sh>A small CGI script</a></li>
<li><a href=seval.html>Computing Scheme Froms Interactively</a></li>
<li><a href=files/text.txt>Text file</a></li>
<li><a href=files>Directory</a></li>
<li><a href=files/zipped.gz>Compressed File</a></li>
@ -20,7 +21,7 @@
<hr>
<!-- Created: Thu Aug 22 16:44:16 CEST 2002 -->
<!-- hhmts start -->
Last modified: Thu Aug 22 17:16:33 CEST 2002
Last modified: Wed Aug 28 17:56:06 CEST 2002
<!-- hhmts end -->
</body>
</html>

View File

@ -0,0 +1,25 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Evaluating Scheme Expressions Interactively</title>
</head>
<body>
<h1>Evaluating Scheme Expressions Interactively</h1>
<form action="seval" method="post">
Type in your scheme expression as you would at any REPL:
<br>
<input type="text" name="program">
<input type="submit">
<input type="reset">
</form>
<hr>
<address><a href="mailto:andreas.bernauer@gmx.de">Andreas Bernauer</a></address>
<!-- Created: Wed Aug 28 16:35:32 CEST 2002 -->
<!-- hhmts start -->
Last modified: Wed Aug 28 16:40:54 CEST 2002
<!-- hhmts end -->
</body>
</html>