perl cgi server responses a PL file instead of an xml file

i set the content-type to text/xml and want to get a xml file, but the response of the cgi program is a PL file and it forces the browser to open the download dialog. I download the file and open it with a textediter. At the beginning of the file it shows the http header, i think it's strange. Here is the URL of the file: "http://23.23.123.93/watergrid/dma/j796/hydro"Can anyone help me please?\[code\]if(defined($result)) {#imitate nph- cgi for IISmy $status = defined($ENV{'SERVER_SOFTWARE'}) && $ENV{'SERVER_SOFTWARE'}=~/IIS/ ? $ENV{SERVER_PROTOCOL} || 'HTTP/1.0' : 'Status:';my $code = $result->code;binmode(STDOUT);print STDOUT "$status $code ", HTTP::Status::status_message($code),"\015\012", $result->headers_as_string, "\015\012", $result->content;}\[/code\]
 
Back
Top