diff options
| author | Jesse Wolfe <jes5199@gmail.com> | 2011-02-08 12:02:06 -0800 |
|---|---|---|
| committer | Jesse Wolfe <jes5199@gmail.com> | 2011-02-08 12:02:06 -0800 |
| commit | 1f89906fcb87690a688b4d7facf6af0e4c554d6d (patch) | |
| tree | 74d502b03827a6e3143488498e1a314154cccc45 /lib/puppet/network/http/rack | |
| parent | 70a43c4b0d3018a39e29c50b1caf7dec38694323 (diff) | |
| download | puppet-1f89906fcb87690a688b4d7facf6af0e4c554d6d.tar.gz puppet-1f89906fcb87690a688b4d7facf6af0e4c554d6d.tar.xz puppet-1f89906fcb87690a688b4d7facf6af0e4c554d6d.zip | |
(#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 <markus@puppetlabs.com>
Diffstat (limited to 'lib/puppet/network/http/rack')
| -rw-r--r-- | lib/puppet/network/http/rack/rest.rb | 4 |
1 files changed, 1 insertions, 3 deletions
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) |
