From 58f027b6c7bf6bb319e5601594219887770edcc7 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 16 Dec 2013 20:38:10 +0000 Subject: remove :to_io support :to_io never was a Rack extension, and ends up breaking the case where an SSL socket is proxied. The role of :to_io in IO-like objects is to aid IO.select and like methods. --- lib/clogger/pure.rb | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'lib') diff --git a/lib/clogger/pure.rb b/lib/clogger/pure.rb index 44f4e62..bb3fc16 100644 --- a/lib/clogger/pure.rb +++ b/lib/clogger/pure.rb @@ -82,17 +82,10 @@ class Clogger def to_path rv = @body.to_path - # try to avoid unnecessary path lookups with to_io.stat instead of - # File.size - @body_bytes_sent = - @body.respond_to?(:to_io) ? @body.to_io.stat.size : File.size(rv) + @body_bytes_sent = File.size(rv) rv end - def to_io - @body.to_io - end - private def byte_xs(s) -- cgit v1.2.3-24-ge0c7