Subject: Re: CMUCL based CGI script
From: rpw3@rigden.engr.sgi.com (Rob Warnock)
Date: 2000/04/15
Newsgroups: comp.lang.lisp
Message-ID: <8d8epj$1bua$1@fido.engr.sgi.com>
Ingo Blank  <ibl@myokay.net> wrote:
+---------------
| I tried to use CMUCL as a CGI scripting host.
| 1. Shell script
|    #!/bin/sh
|    lisp -eval '(load "myscript")'
| 2. Lisp script "myscript.lisp"
|    (format t "Content-type: text/html~%~%")
|    (format t "<H1>Hi, I am a CGI script written in Lisp!</H1>~%")
| 
| When I run this, the lisp system prints out a  <; Loading #p
| "myscript.lisp"> message on stdout, what scrambles the http header of course.
| Does anybody know a solution for this problem ?
+---------------

	% cat my-cgi
	#!/bin/sh
	cmucl -eval '(progn (setq *load-verbose* nil) (load "myscript.lisp"))'

	% cat myscript.lisp
	(format t "Content-type: text/html~%~%")
	(format t "<H1>Hi, I am a CGI script written in Lisp!</H1>~%")
	(quit)

	% my-cgi
	Content-type: text/html

	<H1>Hi, I am a CGI script written in Lisp!</H1>
	% 


-Rob

-----
Rob Warnock, 41L-955		rpw3@sgi.com
Applied Networking		http://reality.sgi.com/rpw3/
Silicon Graphics, Inc.		Phone: 650-933-1673
1600 Amphitheatre Pkwy.		PP-ASEL-IA
Mountain View, CA  94043