From b778740240e6dbeeaf1c4cf604865170e7cb454c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 10 Nov 2009 11:30:30 -0800 Subject: http_response: don't "rescue nil" for body.close This can hide bugs in Rack applications/middleware. Most other Rack handlers/servers seem to follow this route as well, so this helps ensure broken things will break loudly and more consistently across all Rack-enabled servers. --- lib/rainbows/http_response.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/rainbows/http_response.rb') diff --git a/lib/rainbows/http_response.rb b/lib/rainbows/http_response.rb index 6617666..39ebd32 100644 --- a/lib/rainbows/http_response.rb +++ b/lib/rainbows/http_response.rb @@ -30,7 +30,7 @@ module Rainbows body.each { |chunk| socket.write(chunk) } ensure - body.respond_to?(:close) and body.close rescue nil + body.respond_to?(:close) and body.close end end end -- cgit v1.2.3-24-ge0c7