strange CGI problem
mrecks at my-deja.com
mrecks at my-deja.com
Sat Jan 29 10:46:22 EST 2000
More information about the Python-list mailing list
Sat Jan 29 10:46:22 EST 2000
- Previous message (by thread): strange CGI problem
- Next message (by thread): strange CGI problem
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
In article <85hb86$jjq$1 at web1.cup.hp.com>, "Arad Rostampour" <arad at fc.hp.com> wrote: > Do you have a: > > print "Content-type: text/html\n" > > as your first output? > > Enjoy, > Arad > -- > Arad Rostampour- arad at fc.hp.com > NT Platform and I/O Team > Software and System Development Lab > Hewlett-Packard > > Skip Montanaro wrote in message > <14459.47851.670815.455938 at beluga.mojam.com>... > > > > >> I'm creating a little web-site; for some reason when I view the page > > >> in Internet Explorer, it's fine, but Netscape shows me the raw html > > >> as if it's a text file. What would cause this? > > > >Sounds like IE is looking at the contents and saying, "hmmm... looks like > >HTML", and displaying it. Make sure your CGI script is spitting out an > >appropriate Content-type header. > > > > > > Being new to CGI and Perl we have experienced a similar problem (with Netscape but not with IE) and it appears you can get round it in at least a couple of ways. 1) The easy way This problem can be caused by having a non-standard extension to your CGI program name, eg 'myprogram.cgi'. Try changing the extension (the bit after the dot) to a 'standard' one eg 'myprogram.html' Don't forget to alter the relevant entry in the page that calls the CGI program. 2) A slightly more difficult method. With a non-standard extension to your CGI program name the (Netscape) browser 'sees' your cgi program and attempts to use an external application, as defined by the extension to read it, if you have not defined a 'cgi' application it may default to displaying the source (or plain text) Get around this problem by defining an application to cater for pages/programs with 'cgi' (or whatever you use) extensions and setting them to use the browser to interpret them instead of an external app. Hope this helps. X Sent via Deja.com http://www.deja.com/ Before you buy.
- Previous message (by thread): strange CGI problem
- Next message (by thread): strange CGI problem
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list