Loading ...
Sorry, an error occurred while loading the content.

CGI: IIS 6 behaving differently to IIS 5

Expand Messages
  • pwf_cf
    Hi: We are relatively new to SOAP::Lite and have a Perl SOAP::Lite CGI server script that works fine on IIS 5 but generates the following error on IIS 6: CGI
    Message 1 of 3 , May 12, 2004
    View Source
    • 0 Attachment
      Hi:

      We are relatively new to SOAP::Lite and have a Perl SOAP::Lite CGI
      server script that works fine on IIS 5 but generates the following
      error on IIS 6:

      "CGI Error: The specified CGI application misbehaved by not returning
      a complete set of HTTP headers".

      NOTE: unlike other instances of error msgs like this I've seen
      elsewhere - IIS 6 doesn't tell us anything about the headers it
      thinks have been generated.

      Having put diagnostic code in to see the response and headers when it
      leaves Perl - everything looks just fine.

      Can anyone throw any light on this? Grateful for any help.

      TIA

      Phil Franklin
      Local Government Data Unit - Wales
    • Matt Long
      Just enter the exact error message into a google search and you will get a bunch of possibilities. I ran it and saw that people were suggesting things such as:
      Message 2 of 3 , May 12, 2004
      View Source
      • 0 Attachment

        Just enter the exact error message into a google search and you will get a bunch of possibilities. I ran it and saw that people were suggesting things such as:

         

        -          The header is getting sent twice ( check the output for this line: “Content-type: text/html\n\n” )

        -          The script is not exiting out when a redirect occurs

        -          Script permissions aren’t set properly

        -          .cgi has not been added to IIS as an extension

        -          etc.

         

        Another thing to do is to create a more trivial script, like this:

         

        #!C:/perl/bin/perl

         

        print “Content-type: text/html\n\n”;

        print “hello world!”;

        exit;

         

        Test that out. If that works, then start removing code from your script until it does actually run. Then you’ll know approximately which code is failing.

         

        Best regards,

         

        -Matt

         

         

        -----Original Message-----
        From: pwf_cf [mailto:pwf_cf@...]
        Sent:
        Wednesday, May 12, 2004 6:16 AM
        To: soaplite@yahoogroups.com
        Subject: [soaplite] CGI: IIS 6 behaving differently to IIS 5

         

        Hi:

        We are relatively new to SOAP::Lite and have a Perl SOAP::Lite CGI
        server script that works fine on IIS 5 but generates the following
        error on IIS 6:

        "CGI Error: The specified CGI application misbehaved by not returning
        a complete set of HTTP headers".

        NOTE: unlike other instances of error msgs like this I've seen
        elsewhere - IIS 6 doesn't tell us anything about the headers it
        thinks have been generated.

        Having put diagnostic code in to see the response and headers when it
        leaves Perl - everything looks just fine.

        Can anyone throw any light on this? Grateful for any help.

        TIA

        Phil Franklin
        Local Government Data Unit - Wales





      • Phil Franklin
        Dear Matt / all: Did the google search before posting the original. Don t believe we are doing any of the things you mention, or that we saw elsewhere. Trivial
        Message 3 of 3 , May 12, 2004
        View Source
        • 0 Attachment
          Dear Matt / all:
           
          Did the google search before posting the original. Don't believe we are doing any of the things you mention, or that we saw elsewhere. Trivial 'normal CGI' scripts definitely work. The SOAP::Lite CGI script works fine on IIS 5 and a close relative of it works fine on Win32 Apache 2.0.49, trimmed down code follows:
           
          use SOAP::Transport::HTTP;
          my $diag = 1;
          my $server = SOAP::Transport::HTTP::CGI->dispatch_to('LaCode');
          $server->handle;
          $server->response->remove_header("SOAPServer");
          if ($diag) {
            open (OUT, ">>soapdiag.txt") or die;
            print OUT "-------\nRequest\n-------\n", $server->request->as_string;
            print OUT "--------\nResponse\n--------\n", $server->response->as_string;
            close OUT;
          }
          # back to caller
          package LaCode;
          sub getLA {
          # code for getLA
          }
          1;
           
          The request & response printed to soapdiag.txt look spot on. I neglected to mention that the failing environment is IIS 6 on Windows 2003 Server.  
           
          Any other suggestions?

          Thanks Phil



          Matt Long <matt.long@...> wrote:

          Just enter the exact error message into a google search and you will get a bunch of possibilities. I ran it and saw that people were suggesting things such as:

           

          -          The header is getting sent twice ( check the output for this line: “Content-type: text/html\n\n” )

          -          The script is not exiting out when a redirect occurs

          -          Script permissions aren’t set properly

          -          .cgi has not been added to IIS as an extension

          -          etc.

           

          Another thing to do is to create a more trivial script, like this:

           

          #!C:/perl/bin/perl

           

          print “Content-type: text/html\n\n”;

          print “hello world!”;

          exit;

           

          Test that out. If that works, then start removing code from your script until it does actually run. Then you’ll know approximately which code is failing.

           

          Best regards,

           

          -Matt

           

           

          -----Original Message-----
          From: pwf_cf [mailto:pwf_cf@...]
          Sent:
          Wednesday, May 12, 2004 6:16 AM
          To: soaplite@yahoogroups.com
          Subject: [soaplite] CGI: IIS 6 behaving differently to IIS 5

           

          Hi:

          We are relatively new to SOAP::Lite and have a Perl SOAP::Lite CGI
          server script that works fine on IIS 5 but generates the following
          error on IIS 6:

          "CGI Error: The specified CGI application misbehaved by not returning
          a complete set of HTTP headers".

          NOTE: unlike other instances of error msgs like this I've seen
          elsewhere - IIS 6 doesn't tell us anything about the headers it
          thinks have been generated.

          Having put diagnostic code in to see the response and headers when it
          leaves Perl - everything looks just fine.

          Can anyone throw any light on this? Grateful for any help.

          TIA

          Phil Franklin
          Local Government Data Unit - Wales


          Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now

        Your message has been successfully submitted and would be delivered to recipients shortly.