about summary refs log tree commit homepage
path: root/lib/kcar/response.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kcar/response.rb')
-rw-r--r--lib/kcar/response.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/kcar/response.rb b/lib/kcar/response.rb
index 6f151e5..67e0286 100644
--- a/lib/kcar/response.rb
+++ b/lib/kcar/response.rb
@@ -62,7 +62,9 @@ class Response < Struct.new(:sock, :hdr, :unchunk, :buf, :parser)
   # body.  It may only be called once (usually by a Rack server) as it streams
   # the response body off the our socket object.
   def each(&block)
-    return if parser.body_eof?
+    if parser.body_eof?
+      return
+    end
     if unchunk
       parser.chunked? ? each_unchunk(&block) : each_identity(&block)
     else