diff options
Diffstat (limited to 'lib/kcar/response.rb')
-rw-r--r-- | lib/kcar/response.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/kcar/response.rb b/lib/kcar/response.rb index af15ca0..7fa804b 100644 --- a/lib/kcar/response.rb +++ b/lib/kcar/response.rb @@ -4,7 +4,9 @@ # This may be used to generate a Rack response synchronously. class Kcar::Response + # :stopdoc: attr_accessor :sock, :hdr, :unchunk, :buf, :parser + # :startdoc: # By default we readpartial at most 16K off a socket at once READ_SIZE = 0x4000 @@ -60,11 +62,11 @@ class Kcar::Response def each return if @parser.body_eof? if @unchunk - @parser.chunked? ? each_unchunk { |x| yield x } : - each_identity { |x| yield x } + @parser.chunked? ? each_unchunk { |buf| yield buf } : + each_identity { |buf| yield buf } else - @parser.chunked? ? each_rechunk { |x| yield x } : - each_identity { |x| yield x } + @parser.chunked? ? each_rechunk { |buf| yield buf } : + each_identity { |buf| yield buf } end end |