summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBrice Figureau <brice-puppet@daysofwonder.com>2010-07-25 18:09:33 +0200
committerMarkus Roberts <Markus@reality.com>2010-07-25 22:24:50 -0700
commit4065e81f76020c29ed8ccfc1cf6c481aa202cb23 (patch)
tree1d41b7f2ae0739a7db6351f0df0bc8330db15b56 /lib
parent3163932f70e824906d48edc9665b4017a4669797 (diff)
downloadpuppet-4065e81f76020c29ed8ccfc1cf6c481aa202cb23.tar.gz
puppet-4065e81f76020c29ed8ccfc1cf6c481aa202cb23.tar.xz
puppet-4065e81f76020c29ed8ccfc1cf6c481aa202cb23.zip
Fix race condition in rack autoloading of request/response
Ruby autoloader seems to not be thread-safe. Since rack uses it to lazily load the Rack::Request and Rack::Response classes, on jruby it fails if the first compilation is done with multiple concurrent threads. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/network/http/rack.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/puppet/network/http/rack.rb b/lib/puppet/network/http/rack.rb
index c18a07559..5b4ef7e1c 100644
--- a/lib/puppet/network/http/rack.rb
+++ b/lib/puppet/network/http/rack.rb
@@ -1,3 +1,6 @@
+require 'rack'
+require 'rack/request'
+require 'rack/response'
require 'puppet/network/http'
require 'puppet/network/http/rack/rest'