Hi,

I think I have solved the old REBOL CGI problem on the Amiga platform.. or at
least found what is causing it...

Compare the output from these two scripts:

REBOL:

#!/usr/bin/rebol --cgi
REBOL []
prin "Content-Type: text/html^/^/"
print "Hello world from REBOL CGI<BR>"

Perl:

#!/usr/local/bin/perl
print "Content-Type: text/html\n\n";
print "Hello world from REBOL CGI<BR>"


I ran these using:
perl cgi_from_perl.cgi >ram:cgi_from_perl
rebol --cgi cgi_from_rebol.cgi >ram:cgi_from_rebol

Using the 'type' command, no visible difference was shown.. BUT..

type hex ram:cgi_from_rebol
0000: 2008436F 6E74656E 742D5479 70653A20     .Content-Type:      
0010: 74657874 2F68746D 6C0A0A48 656C6C6F    text/html..Hello     
0020: 20776F72 6C642066 726F6D20 5245424F     world from REBO     
0030: 4C204347 493C4252 3E0A                 L CGI<BR>.

type hex ram:cgi_from_perl
0000: 436F6E74 656E742D 54797065 3A207465    Content-Type: te     
0010: 78742F68 746D6C0A 0A48656C 6C6F2077    xt/html..Hello w     
0020: 6F726C64 2066726F 6D205245 424F4C20    orld from REBOL      
0030: 4347493C 42523E                        CGI<BR>

Notice the <space> and <tab> in the beginning of the REBOL script output..
This should definitely not be there...

These two characters are ALWAYS a result from running REBOL/Amiga.. both
/View and /Core produces this extra characters.

/PeO


> On Tue, Feb 20, 2001 at 07:44:18AM -0600, GS Jones wrote:
> 
> >     print "Content-Type: text/html^/"
> 
> Try changing this to
> 
> prin ["Content-Type: text/html" crlf crlf]
> 
> The HTTP standard requires CRLF as the separator, not just LF. Apache
> probably does not convert this by itself.
> 
> -- 
> Holger Kruse
> [EMAIL PROTECTED]
> 
> -- 
> To unsubscribe from this list, please send an email to
> [EMAIL PROTECTED] with "unsubscribe" in the 
> subject, without the quotes.
> 
> 
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to