Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IIS complete set of HTTP headers 1

Status
Not open for further replies.

evaleah

Programmer
Mar 18, 2003
252
US
I am totally new to Perl and have just inherited a site I need to make alterations to. The first thing is to get it to run in IIS. Currently it is returning the error:
"The specified CGI application misbehaved by not returning a complete set of HTTP headers."

I found the following article ( and tried to add the block of text it suggested. I don't think I did it right at all though.

The routine I have that I need to alter is:
sub http_header {

#print STDERR "http_header: cookies = $hccp::cookie_answers, $hccp::cookie_qtaken\n";

print $hccp::query->header(-expires=>'now',
-Pragma=>'no-cache',
-cookie=>[$hccp::cookie_answers,$hccp::cookie_qtaken,$hccp::cookie_session,$hccp::cookie_survey]);
}

Can anyone tell me how I need to alter this to make it work in IIS?

Thanks,
Eva
 
check the server error log and see if there is a more detailed description of the error. The error you are getting is not necessarily an indication that the http headers are incorrect or incomplete. Worse comes to worse add this line near the beginning of the srcipt:

use CGI::Carp qw/fatalsToBrowser/;

and that will print a header and the error (hopefully) to the browser.

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
Kevin,

Thank you so much for that suggested line. I was lost in the logs so I put that code in. I got back exactly the error and we were able to fix it in moments.

Eva
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top