Zeng, Kelly (NIH/NLM/LHC) wrote:
-------------8<---------- Start Bug Report ------------8<----------
1. Problem Description:
This is probably the weirdest thing I have ever witnessed. Try the following "test.pl":


#!/usr/bin/env perl -w

use strict;

# the

my $html = <<"END_OF_HTML";
<html><head><title>title
</title></head>
<body><h1>Hello
</h1>
</body></html>
END_OF_HTML
print "$html\n";

Try that in Netscape, "test.pl" is displayed as plain text. If you
view->page info, you will see "File MIME Type:text/plain". If you remove
the comment line "# the", then "test.pl" is displayed fine as text/html. We
have tried other words in comment lines. "the/The" seems to be the only
word that causes the problem.

I can't reproduce that. I get:


[Wed Jan 28 23:45:54 2004] [error] [client 127.0.0.1] malformed header from script. Bad header=<html><head><title>title: test.pl

with Apache::Registry. You didn't show your setup so I can't tell if your is different.

In any case I doubt this has anything to do with mod_perl. Your script is broken, you either need to print "Content-type: text/html\n\n" and scan headers, or set $r->content_type('text/html'); You need to make it executable and you need to setup 'Options +ExecCGI'.

Most likely your Apache configuration is broken, so it sends the file as is instead of executing it, and Netscape tries to be smart and render the source as HTML. Fix your config and the script and the weirdest thing will go away.

CGI : 2.56, 2.81

You better get a newer CGI.pm if you want to use mp2. 3.+ is good.


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to