summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBrice Figureau <brice-puppet@daysofwonder.com>2010-08-04 18:46:29 +0200
committerMarkus Roberts <Markus@reality.com>2010-08-05 10:24:13 -0700
commit8e31b528e139a2940d6932ab80375bb5eebfbe29 (patch)
tree627f4615b86674224825013d79b9e205f34934b4 /lib
parent037bb329f090ce86227fc62b51d081831fa9de03 (diff)
downloadpuppet-8e31b528e139a2940d6932ab80375bb5eebfbe29.tar.gz
puppet-8e31b528e139a2940d6932ab80375bb5eebfbe29.tar.xz
puppet-8e31b528e139a2940d6932ab80375bb5eebfbe29.zip
Passenger needs HTTP headers values to be string
When streaming a file through rack, we set the Content-Length header to be the size of the transmitted file. This size is an int, and recent passenger versions only support string values. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/network/http/rack/rest.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/network/http/rack/rest.rb b/lib/puppet/network/http/rack/rest.rb
index e5f50c465..b7e1d9709 100644
--- a/lib/puppet/network/http/rack/rest.rb
+++ b/lib/puppet/network/http/rack/rest.rb
@@ -41,7 +41,7 @@ class Puppet::Network::HTTP::RackREST < Puppet::Network::HTTP::RackHttpHandler
unless result.is_a?(File)
response.write result
else
- response["Content-Length"] = result.stat.size
+ response["Content-Length"] = result.stat.size.to_s
response.body = RackFile.new(result)
end
end