From: Mike Palmer <michaeljohnpalmer@gm...> - 2012-01-24 21:08:14
Dear Clisp Users
I have been teaching myself lisp using clisp 2.49 on Windows 7
Professional. I've been trying to write some simple CGI scripts but
have been running into trouble when I try to read in binary input from
standard input. I've been using make-stream as explained in the
(http://clisp.podval.org/impnotes.html#bin-stdio). Although I can read
in binary from the standard input using an interactive session, when I
run it in a CGI script it generates Apache errors. I'm using Apache
2.2, also on Windows 7 Professional.
Here is a stripped back version of the code which still produces the error:
#! C:\Program Files\clisp-2.49\clisp.exe --quiet
(format t "Content-type: text/plain; charset=iso-8859-1~1%~1%")
(format t "hello world~1%")
(EXT:MAKE-STREAM :INPUT :DIRECTION :INPUT :ELEMENT-TYPE '(UNSIGNED-BYTE 8))
(format t "goodbye world~1%")
Here is the error:
[Tue Jan 24 20:26:44 2012] [error] [client 127.0.0.1] *** - Invalid
direction :INPUT for accessing #*11011100000000000000000000000000\r
Of course, the real code runs when processing a multipart/form-data post.
Any help or suggestions would be greatly welcome.