Quote:> I recently installed Debian 3.0. Using Apache, to test a perl script (before
> installing MySQL), it appears to find the localhost cgi-bin and execute it,
> but the browser doesn't display the output. Instead, a window pops up with
> the following:
> "Open 'http://localhost/cgi-bin/first.pl'?
> Under that, three buttons:
> "Save to disk" "Open" "Cancel"
> When choosing "Open", I selected an editor which appeared with the correct
> Perl output. Obviously, the script was found and executed.
> I would expect I've a simple step to follow or correct to get the output
> routed to the browser - hopefully in 'httpd.conf'? Any suggestions?
That is something I might expect to happen using MSIE as a client on a Win
box with Perl installed. MSIE is not MIME compliant and often uses its
own methods to determine Content-type (especially text/plain which it
considers ambiguous).
The only reason I think that could happen with a Linux browser is if you
munged the Content-type header in the script output. What Content-type
did your script print and did you follow the last header line with a blank
line (or double newline)?
If you use the Perl CGI module, it has a header object or function that
can output proper headers, assuming that you specify the -type for
anything other than text/html.
If you want to see what what is in the http headers, you could either use
the option for wget to display headers, or 'telnet localhost 80' and enter
the following followed by a blank line (hit enter key an extry time).
HEAD /cgi-bin/first.pl HTTP/1.0
Or use GET instead of HEAD to see full output.
--
David Efflandt - All spam ignored http://www.de-srv.com/
http://www.autox.chicago.il.us/ http://www.berniesfloral.net/
http://cgi-help.virtualave.net/ http://hammer.prohosting.com/~cgi-wiz/