summary refs log tree commit
diff options
context:
space:
mode:
-rw-r--r--lib/rack/handler/webrick.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/rack/handler/webrick.rb b/lib/rack/handler/webrick.rb
index dcbf96ca..264c1689 100644
--- a/lib/rack/handler/webrick.rb
+++ b/lib/rack/handler/webrick.rb
@@ -107,6 +107,8 @@ module Rack
             res.body = rd
             res.chunked = true
             io_lambda.call wr
+          elsif body.respond_to?(:to_path)
+            res.body = ::File.open(body.to_path, 'rb')
           else
             body.each { |part|
               res.body << part