diff options
Diffstat (limited to 'lib/mongrel/camping.rb')
-rw-r--r-- | lib/mongrel/camping.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/mongrel/camping.rb b/lib/mongrel/camping.rb index d997a3b..26546c1 100644 --- a/lib/mongrel/camping.rb +++ b/lib/mongrel/camping.rb @@ -40,7 +40,16 @@ module Mongrel head[k] = vi end end - out << controller.body + if controller.body.respond_to? :read + while chunk = controller.body.read(16384) + out << chunk + end + if controller.body.respond_to? :close + controller.body.close + end + else + out << controller.body + end end end end |