From 1f89906fcb87690a688b4d7facf6af0e4c554d6d Mon Sep 17 00:00:00 2001 From: Jesse Wolfe Date: Tue, 8 Feb 2011 12:02:06 -0800 Subject: (#6257) Speed up PUT and POST requests under rack This patch significantly speeds up reading the body of HTTP requests from Rack. Reviewed-by: Markus Roberts --- lib/puppet/network/http/rack/rest.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/puppet/network/http/rack/rest.rb b/lib/puppet/network/http/rack/rest.rb index b7e1d9709..602927a78 100644 --- a/lib/puppet/network/http/rack/rest.rb +++ b/lib/puppet/network/http/rack/rest.rb @@ -76,9 +76,7 @@ class Puppet::Network::HTTP::RackREST < Puppet::Network::HTTP::RackHttpHandler # request.body has some limitiations, so we need to concat it back # into a regular string, which is something puppet can use. def body(request) - body = '' - request.body.each { |part| body += part } - body + request.body.read end def extract_client_info(request) -- cgit