[plt-scheme] CGI using MzScheme on Windows
I've tried TinyWeb and Apache and I can't get it to
work either. It appears that whatever MzScheme is
writing to isn't the port the webserver is reading
from.
I'm using W2K.
My tests are:
[hello.bat]
; @echo off
; "C:\Program Files\PLT\mzscheme.exe" -r %0 %*
; goto :end
(require (lib "cgi.ss" "net"))
(output-http-headers)
(display
"<html><head><title>Hello</title></head><body><h1>Hello</h1></body></html>")
; :end
[hello.scm]
#! "C:\Program Files\PLT\mzscheme.exe" -mv
(require (lib "cgi.ss" "net"))
(output-http-headers)
(display
"<html><head><title>Hello</title></head><body><h1>Hello</h1></body></html>")
The log file reads:
%% [Tue Dec 03 16:58:39 2002] GET /cgi-bin/hello.bat
HTTP/1.1
%% 500 C:/Program Files/Apache
Group/Apache2/cgi-bin/hello.bat
%request
Host: aha.lshift.net
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0;
en-US; rv:1.2) Gecko/20021126
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.1
Accept-Language: en-us, en;q=0.50
Accept-Encoding: gzip, deflate, compress;q=0.9
Accept-Charset: ISO-8859-1, utf-8;q=0.66, *;q=0.66
Keep-Alive: 300
Connection: keep-alive
Cookie: Bugzilla_login=noel at lshift.net;
Bugzilla_logincookie=765
%response
%% [Tue Dec 03 16:59:30 2002] GET /cgi-bin/hello.scm
HTTP/1.1
%% 500 C:/Program Files/Apache
Group/Apache2/cgi-bin/hello.scm
%request
Host: aha.lshift.net
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0;
en-US; rv:1.2) Gecko/20021126
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.1
Accept-Language: en-us, en;q=0.50
Accept-Encoding: gzip, deflate, compress;q=0.9
Accept-Charset: ISO-8859-1, utf-8;q=0.66, *;q=0.66
Keep-Alive: 300
Connection: keep-alive
Cookie: Bugzilla_login=noel at lshift.net;
Bugzilla_logincookie=765
%response
Note the response is always empty. Works like a charm
on Linux!
Noel
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com