summaryrefslogtreecommitdiffstats
path: root/lib/puppet/network/http
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-05-02 13:20:00 -0500
committerLuke Kanies <luke@madstop.com>2008-05-02 13:20:00 -0500
commit4c590df607f3d2cb6921b8d8269862a4f8f2456c (patch)
treefaa9497988f4c108344472e8a41347294cf004dc /lib/puppet/network/http
parent31b79fa7760f95059a4e2afb35e734de283cf4a0 (diff)
downloadpuppet-4c590df607f3d2cb6921b8d8269862a4f8f2456c.tar.gz
puppet-4c590df607f3d2cb6921b8d8269862a4f8f2456c.tar.xz
puppet-4c590df607f3d2cb6921b8d8269862a4f8f2456c.zip
Adding xmlrpc backward compatibility to the new Mongrel code.
Diffstat (limited to 'lib/puppet/network/http')
-rw-r--r--lib/puppet/network/http/mongrel.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/puppet/network/http/mongrel.rb b/lib/puppet/network/http/mongrel.rb
index 5e93b88ba..847781cf2 100644
--- a/lib/puppet/network/http/mongrel.rb
+++ b/lib/puppet/network/http/mongrel.rb
@@ -16,6 +16,7 @@ class Puppet::Network::HTTP::Mongrel
@protocols = args[:protocols]
@handlers = args[:handlers]
+ @xmlrpc_handlers = args[:xmlrpc_handlers]
@server = Mongrel::HttpServer.new(args[:address], args[:port])
setup_handlers
@@ -45,6 +46,15 @@ class Puppet::Network::HTTP::Mongrel
@server.register('/' + handler.to_s + 's', klass.new(:server => @server, :handler => handler))
end
end
+
+ if @protocols.include?(:xmlrpc) and ! @xmlrpc_handlers.empty?
+ setup_xmlrpc_handlers
+ end
+ end
+
+ # Use our existing code to provide the xmlrpc backward compatibility.
+ def setup_xmlrpc_handlers
+ @server.register('/RPC2', Puppet::Network::HTTPServer::Mongrel.new(@xmlrpc_handlers))
end
def class_for_protocol(protocol)