On 2002.05.27 12:57 Andrew McNaughton wrote:
> 
> Sounds to me like you're not setting your content-type correctly for
> some
> reason.  Have a look at the headers being sent out.  It's either not
> sending this header, or it's sending something the browser doesn't
> know
> what to do with.

This is the content of test.pl

BEGIN-SCRIPT
--
#!/usr/bin/perl

# your httpd.conf should have something like this:

# Alias /perl/  /real/path/to/perl-scripts/

# <Location /perl>
# SetHandler  perl-script
# PerlHandler Apache::Registry
# PerlSendHeader On
# Options +ExecCGI
# </Location>

print "Content-type: text/html\n\n";

print "<b>Date: ", scalar localtime, "</b><br>\n";

print "%ENV: <br>\n", map { "$_ = $ENV{$_} <br>\n" } keys %ENV;
--
END-SCRIPT

Based on this, I would expect the content to be set to text/html and 
the page to be displayed to be a listing of the current environment.

Galeon identifies the content type as application/x-perl.  This would 
seem to indicate to me that Apache is serving the script directly 
instead of executing the script and serving the output.  According to 
the mod_perl Guide, the ExecCGI option (which I have set for Location 
/perl) is supposed to avoid this situation.


Thanx,
Ian

Reply via email to