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

SOAP::Lite on IIS returns double HTTP Status lines

Expand Messages
  • T Bryce Yehl
    I ve been having trouble getting Python s xmlrpclib to interop with a SOAP::Lite server on IIS. I narrowed the problem down to SOAP::Lite ... Server:
    Message 1 of 4 , Dec 5, 2002
    • 0 Attachment
      I've been having trouble getting Python's xmlrpclib to interop with a
      SOAP::Lite server on IIS. I narrowed the problem down to SOAP::Lite
      returning two HTTP status lines:

      >HTTP/1.1 200 OK
      Server: Microsoft-IIS/5.0
      Date: Thu, 05 Dec 2002 01:34:37 GMT
      >HTTP/1.0 200 OK
      Content-Length: 414
      Content-Type: text/xml
      SOAPServer: SOAP::Lite/Perl/0.55

      With experimentation I figured out that IIS expects CGIs to return a
      "Status: NNN" header, not a full HTTP status line.

      I don't grok Perl well enough to fix this myself. Can someone help me
      out with a patch?
    • Duncan Cameron
      ... There seems to be some processing in the SOAP::Transport::HTTP::CGI package in SOAP/HTTP.pm deliberately to do what you don t want to happen. # imitate
      Message 2 of 4 , Dec 6, 2002
      • 0 Attachment
        On 2002-12-05 T Bryce Yehl wrote:
        >I've been having trouble getting Python's xmlrpclib to interop with a
        >SOAP::Lite server on IIS. I narrowed the problem down to SOAP::Lite
        >returning two HTTP status lines:
        >
        > >HTTP/1.1 200 OK
        > Server: Microsoft-IIS/5.0
        > Date: Thu, 05 Dec 2002 01:34:37 GMT
        > >HTTP/1.0 200 OK
        > Content-Length: 414
        > Content-Type: text/xml
        > SOAPServer: SOAP::Lite/Perl/0.55
        >
        >With experimentation I figured out that IIS expects CGIs to return a
        >"Status: NNN" header, not a full HTTP status line.
        >
        >I don't grok Perl well enough to fix this myself. Can someone help me
        >out with a patch?
        >
        There seems to be some processing in the SOAP::Transport::HTTP::CGI
        package in SOAP/HTTP.pm deliberately to do what you don't want to
        happen.

        # imitate nph- cgi for IIS (pointed by Murray Nesbitt)
        my $status = defined($ENV{'SERVER_SOFTWARE'}) && $ENV{'SERVER_SOFTWARE'}=~/IIS/
        ? $ENV{SERVER_PROTOCOL} || 'HTTP/1.0' : 'Status:';

        Maybe you need to stop IIS generating the status line itself.
        Or you can change this code to generate what you think you need.

        Regards,
        Duncan Cameron
      • T Bryce Yehl
        ... $ENV{ SERVER_SOFTWARE }=~/IIS/ ... I dug into HTTP.pm last night and found that, for my server I just added a line underneath: $status = Status: ; I m not
        Message 3 of 4 , Dec 6, 2002
        • 0 Attachment
          --- In soaplite@y..., Duncan Cameron <dcameron@b...> wrote:
          > # imitate nph- cgi for IIS (pointed by Murray Nesbitt)
          > my $status = defined($ENV{'SERVER_SOFTWARE'}) &&
          $ENV{'SERVER_SOFTWARE'}=~/IIS/
          > ? $ENV{SERVER_PROTOCOL} || 'HTTP/1.0' : 'Status:';
          >
          > Maybe you need to stop IIS generating the status line itself.
          > Or you can change this code to generate what you think you need.

          I dug into HTTP.pm last night and found that, for my server I just
          added a line underneath: $status = 'Status:';

          I'm not a Perl person, I'm just trying to interop with a Perl app that
          I'm running under IIS for development purposes. If someone wants to
          properly fix this, MS KB Q176113 seems to indicate that IIS 3+ does
          not use NPH unless the filename starts with nph-.

          http://support.microsoft.com/default.aspx?scid=KB;en-us;q176113

          -Bryce
        • Paul Kulchenko
          Hi Bryce, Yes, that s the way it currently works: it s expected that script will be executed in nph- mode. It should be fairly easy to override though; just
          Message 4 of 4 , Dec 8, 2002
          • 0 Attachment
            Hi Bryce,

            Yes, that's the way it currently works: it's expected that script
            will be executed in nph- mode. It should be fairly easy to override
            though; just add "undef $ENV{SERVER_SOFTWARE};" BEFORE
            SOAP::Transport::HTTP::CGI call in your server script and you should
            get expected behavior. It's planed to be configurable in the next
            version.

            Best wishes, Paul.

            --- T Bryce Yehl <listspam@...> wrote:
            > --- In soaplite@y..., Duncan Cameron <dcameron@b...> wrote:
            > > # imitate nph- cgi for IIS (pointed by Murray Nesbitt)
            > > my $status = defined($ENV{'SERVER_SOFTWARE'}) &&
            > $ENV{'SERVER_SOFTWARE'}=~/IIS/
            > > ? $ENV{SERVER_PROTOCOL} || 'HTTP/1.0' : 'Status:';
            > >
            > > Maybe you need to stop IIS generating the status line itself.
            > > Or you can change this code to generate what you think you need.
            >
            > I dug into HTTP.pm last night and found that, for my server I just
            > added a line underneath: $status = 'Status:';
            >
            > I'm not a Perl person, I'm just trying to interop with a Perl app
            > that
            > I'm running under IIS for development purposes. If someone wants to
            > properly fix this, MS KB Q176113 seems to indicate that IIS 3+ does
            > not use NPH unless the filename starts with nph-.
            >
            > http://support.microsoft.com/default.aspx?scid=KB;en-us;q176113
            >
            > -Bryce
            >
            >
            > ------------------------ Yahoo! Groups Sponsor
            >
            > To unsubscribe from this group, send an email to:
            > soaplite-unsubscribe@yahoogroups.com
            >
            >
            >
            > Your use of Yahoo! Groups is subject to
            > http://docs.yahoo.com/info/terms/
            >
            >


            __________________________________________________
            Do you Yahoo!?
            Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
            http://mailplus.yahoo.com
          Your message has been successfully submitted and would be delivered to recipients shortly.