This is an odd thing that I've experienced at times and have found odd things to be the cause. Here are my unsupportable discoveries:
The line of code suggested above and listed below, sometimes resolves the problem:
print "Content-type: text/html\n\n";
However, sometimes that's not enough and a subtle problem crops up. I have found that the Content-type line needs to be before the line starting html (e.g., before print "<html>").
I have also noticed that if you're constructing your print statement like this:
print qq| <html> |;
I have found that moving the <html> to the live below the print qq| will sometimes solve the problem.
print qq|
<html>
Of course, you really should use CGI perl module and do it thus:
use CGI qw/:standard/;
my $q = new CGI;
print $q->header( -type => 'text/html');
print $q->start_html;
(Note, I've only included the relevent code above.)
The other oddity I've discovered in the phenomenom of Netscape spewing my html text out with all of its html tags exposed is a configuration problem with httpd.conf file. I've noticed that if the lines below are not commented out, then they will cause the same problem despite my code.
LoadModule mime_magic_module modules/mime_magic_modules.so
and
AddModule mod_magic_mime.c
In reply to Re: Why doesn't the Location header work?
by Spenser
in thread Why doesn't the Location header work?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |