A body wrapper that emits chunked responses
# File lib/rack/chunked.rb, line 33 33: def close 34: @body.close if @body.respond_to?(:close) 35: end
# File lib/rack/chunked.rb, line 21 21: def each 22: term = TERM 23: @body.each do |chunk| 24: size = bytesize(chunk) 25: next if size == 0 26: 27: chunk = chunk.dup.force_encoding(Encoding::BINARY) if chunk.respond_to?(:force_encoding) 28: yield [size.to_s(16), term, chunk, term].join 29: end 30: yield TAIL 31: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.