summaryrefslogtreecommitdiffstats
path: root/lib/puppet/network
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-08-24 20:53:25 -0500
committerLuke Kanies <luke@madstop.com>2008-08-26 22:40:41 -0700
commit40e76fb83ef466425fec736abbf1913a6426bf01 (patch)
tree59b4239f340260d58e026470b6c060334632a0d5 /lib/puppet/network
parent8ea25efd90b4d2281db12076cbaab3f766cac8b4 (diff)
downloadpuppet-40e76fb83ef466425fec736abbf1913a6426bf01.tar.gz
puppet-40e76fb83ef466425fec736abbf1913a6426bf01.tar.xz
puppet-40e76fb83ef466425fec736abbf1913a6426bf01.zip
Fixing the rest backends for webrick and mongrel so the get the whole request key.
Also adding the Content work necessary to demonstrate that this is actually required. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet/network')
-rw-r--r--lib/puppet/network/http/mongrel/rest.rb2
-rw-r--r--lib/puppet/network/http/webrick/rest.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/puppet/network/http/mongrel/rest.rb b/lib/puppet/network/http/mongrel/rest.rb
index d265dde86..45d21ea62 100644
--- a/lib/puppet/network/http/mongrel/rest.rb
+++ b/lib/puppet/network/http/mongrel/rest.rb
@@ -35,7 +35,7 @@ class Puppet::Network::HTTP::MongrelREST < Mongrel::HttpHandler
# return the key included in the request path
def request_key(request)
# LAK:NOTE See http://snurl.com/21zf8 [groups_google_com]
- x = request.params[Mongrel::Const::REQUEST_PATH].split('/')[2]
+ x = request.params[Mongrel::Const::REQUEST_PATH].split('/', 3)[2]
end
# return the request body
diff --git a/lib/puppet/network/http/webrick/rest.rb b/lib/puppet/network/http/webrick/rest.rb
index 13f795fb2..f06914365 100644
--- a/lib/puppet/network/http/webrick/rest.rb
+++ b/lib/puppet/network/http/webrick/rest.rb
@@ -36,7 +36,7 @@ class Puppet::Network::HTTP::WEBrickREST < WEBrick::HTTPServlet::AbstractServlet
def request_key(request)
# LAK:NOTE See http://snurl.com/21zf8 [groups_google_com]
- x = request.path.split('/')[2]
+ x = request.path.split('/', 3)[2]
end
def body(request)