We have observed that IE (not Netscape) mis-handles
files with a MIME type of text/plain.
The browser should simply display text/plain as
plain text. However, sometimes IE instead asks
whether you want to save the file or open it and,
if open, with which program.
Netscape bases its decision of what to do with data
from servers entirely on the MIME type. Thus, if the
MIME types are configured correctly, Netscape
handles text/plain files correctly.
IE uses a more complex algorithm. It appears to
base its decision primarily (but not entirely) on the
filename extension and the associations thereto, defined
in the operating system's registry. However, the MIME
type is not always ignored. We don't understand how
these factors interact.
In NT, fix this problem by opening NT Explorer -> View
-> Options -> File Types. Find Text Document in the list.
The MIME type field is probably blank. If so, click Edit
and enter text/plain in the MIME type field.
Now, IE should handle this MIME type correctly.
CGI File Types in NT
We once fixed a problem in which NT failed to display
the output from Perl CGI scripts under Apache.
Solution: as above, open the File Types dialog
in NT Explorer. Find the CGI File definition.
Its MIME type is probably blank. Set it to text/plain.
If Neither of the Above Solve Your Problem
If you're desperate, modify your CGI scripts to
return MIME type text/html
instead of text/plain.
This will always work... but your text will lose its
formatting.
To preserve text formatting, insert <pre>
tags in your generated web pages.
Shebang in Perl Scripts in NT
Ordinarily, only Unix requires shebang lines in Perl
scripts, usually like #!/usr/bin/perl
However, we have found that, under Apache on NT they
are sometimes needed for the scripts to execute
properly.
We're confused about the syntax; both forward- and
backslashes appear to work, drive letters and colons
appear to work, too, and Perl does not appear
to mind embedded spaces in directory names such as:
#!C:\Shared Programs\Perl\bin/perl.exe
Disclaimer
We do not vouch for any of this without
rigorous testing... but these are experiments
to try if you're having problems.