My .py CGI script works in IE but not Netscape
Skinny Puppy
skin_pup-python-list at happypoo.com
Mon Jun 24 12:52:33 EDT 2002
Chris [chouster at uclink4.berkeley.edu] wrote:
> My script doesnt work in Netscape for some reason. I'm developing on a
> UNIX envionrment with Python 2.2.1. I open up Netscape in windows and
> only the background picture of my webpage loads... nothing else.
> However in IE it works perfectly. Any general ideas as to what may be
> going on? Thanks.
I have run in to this before. Make sure that your script has something
like this before it outputs other text.
print "Content-type: text/html"
print ""
THe start of the issue is with the web server, most are set to default to
output "Content-type: text/plain" unless you tell it other wise (This is
correct BTW).
Now when netscape receives this it renders your scripts output as a plain
text file, no HTML rendering.
IE on the other hand starts to render the output as plain text, but it
notices the <HTML> tags and switches to rendering HTML.
Jeremy
More information about the Python-list
mailing list