method

run

Importance_0
Ruby latest stable (v2_5_5) - 0 notes - Class: SOAP::RPC::CGIStub

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v1_8_7_330) is shown here.

These similar methods exist in v2_5_5:

run() private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/soap/rpc/cgistub.rb, line 161
  def run
    res = WEBrick::HTTPResponse.new({:HTTPVersion => HTTPVersion})
    begin
      @log.info { "received a request from '#{ @remote_host }'" }
      if @fcgi
        req = SOAPFCGIRequest.new(@fcgi)
      else
        req = SOAPStdinRequest.new($stdin)
      end
      @soaplet.do_POST(req, res)
    rescue HTTPStatus::EOFError, HTTPStatus::RequestTimeout => ex
      res.set_error(ex)
    rescue HTTPStatus::Error => ex
      res.set_error(ex)
    rescue HTTPStatus::Status => ex
      res.status = ex.code
    rescue StandardError, NameError => ex # for Ruby 1.6
      res.set_error(ex, true)
    ensure
      if defined?(MOD_RUBY)
        r = Apache.request
        r.status = res.status
        r.content_type = res.content_type
        r.send_http_header
        buf = res.body
      else
        buf = ''
        res.send_response(buf)
        buf.sub!(/^[^\r]+\r\n/, '')       # Trim status line.
      end
      @log.debug { "SOAP CGI Response:\n#{ buf }" }
      if @fcgi
        @fcgi.out.print buf
        @fcgi.finish
        @fcgi = nil
      else
        print buf
      end
    end
    0
  end
Register or log in to add new notes.