Hi, P-O,
For what its worth, I tried your minimal test script on my Win98, Apache
1.3.14, RBOL/Core 2.3.0.3.1 local testbed, and it worked fine. So there
seems to be some sort of problem more specific to your platform and/or
set up. I doubt that this is the problem but only one additional
newline is needed, since 'print already supplies one. Again, this won't
seem to be the likely cause. Perhaps an Amigan-Apache-REBOLer could
test your script. Good luck.
--Scott
From: "P-O Yliniemi"
> Hi,
>
> I got a strange problem while experimenting with REBOL CGI's....
>
> The problem occurs with both version 2.3 and the latest experimental
> version of core (2.4.40.1.1)
>
> It seems like REBOL is adding its own 'Content-type' header, so
> that all REBOL CGI script output is text/plain (and therefor is
> useless for HTML output)..
>
> Perl cgi's work fine, so I doubt my server configuration is
> incorrect.
>
> If I telnet to the web server and manually enters the request, I
> get the following:
>
> bash-2.03$ telnet 172.16.0.3 80
> Trying 172.16.0.3...
> Connected to 172.16.0.3.
> Escape character is '^]'.
> GET /frida-molle/showpic.cgi?pic=3 HTTP/1.0
>
> HTTP/1.1 200 OK
> Date: Tue, 20 Feb 2001 13:29:33 GMT
> Server: Apache/1.3.14 (AMIGA) PHP/4.0.4 PHP/4.0.4
> Content-Type: text/html
> Connection: close
> Content-Type: text/plain
>
>
> <HTML> <HEAD> <TITLE> .....
>
> ...
>
> The first content-type is the one I have in the script, and the second
seems
> to come from REBOL itself.
>
> Very minimal script to reproduce the problem:
> ---
> #!/usr/local/bin/rebol --cgi
> REBOL [
> Title: "CGI test script"
> ]
>
> print "Content-Type: text/html^/^/"
> print {
> <HTML><HEAD><TITLE>Just testing</TITLE></HEAD>
> <BODY BGCOLOR="white">
> Just testing, minimal REBOL cgi script
> </BODY>
> </HTML>
> }
> ---
>
> and the manual HTTP request I send through telnet:
>
> GET /frida-molle/test-cgi.cgi HTTP/1.0
>
> HTTP/1.1 200 OK
> Date: Tue, 20 Feb 2001 13:38:48 GMT
> Server: Apache/1.3.14 (AMIGA) PHP/4.0.4 PHP/4.0.4
> Content-Type: text/html
> Connection: close
> Content-Type: text/plain
>
> ...
>
> If I on the other site tries to access a page that do not exist, I
get:
>
> GET /nonexistant-page.txt HTTP/1.0
>
> HTTP/1.1 404 Not Found
> Date: Tue, 20 Feb 2001 13:40:30 GMT
> Server: Apache/1.3.14 (AMIGA) PHP/4.0.4 PHP/4.0.4
> Connection: close
> Content-Type: text/html; charset=iso-8859-1
>
> ...
>
> So.. where's the problem ?
>
> /PeO
--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the
subject, without the quotes.