about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-12-16 20:38:10 +0000
committerEric Wong <normalperson@yhbt.net>2014-05-12 06:33:24 +0000
commit58f027b6c7bf6bb319e5601594219887770edcc7 (patch)
treeb3020ed3a5f21937792d1e2fc079234e3f37a21e /lib
parent2b2971794c5deda8fd1b100041c24f06ae55337c (diff)
downloadclogger-58f027b6c7bf6bb319e5601594219887770edcc7.tar.gz
: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.
Diffstat (limited to 'lib')
-rw-r--r--lib/clogger/pure.rb9
1 files changed, 1 insertions, 8 deletions
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)