Hello all,
I am trying to get a header that will work with Apache, IIS 6, and IIS 7. I
won't go into the reason for that here. Let's just say that it's not as
easy as I thought it would be :-)
Anyway, the problem has something to do with NPH. In our code (originally
written for IIS 6) we have
use CGI qw(:standard);
>
print "HTTP/1.0 200 OK\n";
print header;
>
at the top of every cgi script; I read that this is how you tell IIS that
you want NPH.
Apache uses the filename to see if the output is nph (nph- must be the
beginning of the filename) so what I did (which works in both IIS 6 and
Apache) is the following:
use CGI qw(:standard);
> print header('text/html', '200 OK');>
IIS 7, interestingly, seems to *require* NPH, so if I don't either do
use CGI qw(:standard -nph);
>
or
print "HTTP/1.0 200 OK\n";
print header('text/html', '200 OK'); #parameters are apparently optional
>
the browser tries to do something weird with the file, since it doesn't get
the mimetype.
Also note: IIS 6 and 7 are ok without printing any header at all, but Apache
doesn't like that.
Anyway, the best thing right now would be to make
use CGI qw(:standard);
> print header('text/html', '200 OK');>
somehow work in IIS 7. Does anyone know how I can do that? I don't know
all the details for our server configuration, but if you tell me how to get
any details you might need, I can do that.
Thanks either way!
--
-fREW