summaryrefslogtreecommitdiffstats
path: root/lib/puppet/network/http/webrick.rb
diff options
context:
space:
mode:
authorRick Bradley <rick@rickbradley.com>2007-10-16 13:57:56 -0500
committerRick Bradley <rick@rickbradley.com>2007-10-16 13:57:56 -0500
commit2a497fff66a7827059b712e84dcaff171ccab6be (patch)
tree1e66995191c44dd3e5951f13a1dd73263bf60395 /lib/puppet/network/http/webrick.rb
parent6ab78f62ee589e542fd653a54109c0f5141ea026 (diff)
downloadpuppet-2a497fff66a7827059b712e84dcaff171ccab6be.tar.gz
puppet-2a497fff66a7827059b712e84dcaff171ccab6be.tar.xz
puppet-2a497fff66a7827059b712e84dcaff171ccab6be.zip
Refactored to use a Handler base class for server+protocol handlers. Finally eliminated dependency on Puppet.start, etc., from WEBrick HTTP server class. {webrick,mongrel}+REST now support request handling uniformly; need encode/decode next.
Diffstat (limited to 'lib/puppet/network/http/webrick.rb')
-rw-r--r--lib/puppet/network/http/webrick.rb9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/puppet/network/http/webrick.rb b/lib/puppet/network/http/webrick.rb
index 53aa2e99b..c4b2ed3c6 100644
--- a/lib/puppet/network/http/webrick.rb
+++ b/lib/puppet/network/http/webrick.rb
@@ -18,19 +18,14 @@ class Puppet::Network::HTTP::WEBrick
@protocols = args[:protocols]
@handlers = args[:handlers]
@server = WEBrick::HTTPServer.new(:BindAddress => args[:address], :Port => args[:port])
-
setup_handlers
-
- # TODO / FIXME is this really necessary? -- or can we do it in both mongrel and webrick?
- Puppet.newservice(@server)
- Puppet.start
-
+ @server.start
@listening = true
end
def unlisten
raise "WEBrick server is not listening" unless listening?
- shutdown
+ @server.shutdown
@listening = false
end