method
run
Ruby latest stable (v2_5_5)
-
0 notes -
Class: SOAP::RPC::CGIStub
- 1_8_6_287 (0)
- 1_8_7_72 (0)
- 1_8_7_330 (0)
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3
- What's this?
run()
private
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