1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

applied patch by OHARA Shigeki:

* use Apache::Request#headers_in instead of obsolete #headers methods
  * XMLRPC::ModRubyServer::new is no longer a singleton method


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mneumann 2003-10-07 11:22:16 +00:00
parent 885ea0a9f7
commit 777681bda1

View file

@ -509,12 +509,6 @@ Use it in the same way as CGIServer!
=end
class ModRubyServer < BasicServer
@@obj = nil
def ModRubyServer.new(*a)
@@obj = super(*a) if @@obj.nil?
@@obj
end
def initialize(*a)
@ap = Apache::request
@ -524,7 +518,7 @@ class ModRubyServer < BasicServer
def serve
catch(:exit_serve) {
header = {}
@ap.each_header {|key, value| header[key.capitalize] = value}
@ap.headers_in.each {|key, value| header[key.capitalize] = value}
length = header['Content-length'].to_i
@ -569,7 +563,7 @@ class ModRubyServer < BasicServer
h['Status'] ||= "200 OK"
h['Content-length'] ||= body.size.to_s
h.each {|key, value| @ap[key] = value }
h.each {|key, value| @ap.headers_out[key] = value }
@ap.content_type = h["Content-type"]
@ap.status = status.to_i
@ap.send_http_header