[racket] CGI headers

From: scouic (scouic at gmail.com)
Date: Tue Nov 9 00:37:04 EST 2010

Hi all, i've just understood the CGI way-of-life (yes, i'm happy)

First, i have a perl super-easy script (file saved as test.cgi) who prints
"hello", this is it
print "Content-type: text/plain; charset=iso-8859-1\n\n";
print "hello";

It works perfectly,, when i'm connecting at i
have a webpage with "hello".

Now, i want to do the same thing in racket ... i have a 500 internal serve
error, maybe because the script isn't good : this is my script, saved as
test.cgi :
#!c:\Program Files (x86)\DrRacket\mzscheme.exe

(display "Content-type: text/plain; charset=iso-8859-1\n\n")
(display "hello")

##(require net/cgi)
##(generate-html-output "title" (list "content"))

What's wrong here ? Must i write #lang racket at the top, must i change
mzscheme.exe with gracket.exe ... ?
I don't really understand why i've an apache internal server error ...

ps : in my apache httpd.conf i've the line > AddHandler cgi-script .cgi .pl
.rkt .ss

Thanks for your help,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20101109/e5ce6b08/attachment.html>

Posted on the users mailing list.