diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-07-16 01:13:33 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-07-16 01:13:33 -0700 |
commit | 2e913054b36848a05f7ba06c3accbe164c666708 (patch) | |
tree | 3dbac8d2be3f7ba7a00cd23fff146c40e0a3d747 /lib/unicorn/chunked_reader.rb | |
parent | a0f2c4514e969d0a127227201cbdb8e57f71df63 (diff) | |
download | unicorn-2e913054b36848a05f7ba06c3accbe164c666708.tar.gz |
This simplifies chunked_reader substantially with a slight increase in tee_input complexity. This is beneficial because chunked_reader is more complex to begin with and more likely to experience correctness issues.
Diffstat (limited to 'lib/unicorn/chunked_reader.rb')
-rw-r--r-- | lib/unicorn/chunked_reader.rb | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/lib/unicorn/chunked_reader.rb b/lib/unicorn/chunked_reader.rb index 539b350..b813da6 100644 --- a/lib/unicorn/chunked_reader.rb +++ b/lib/unicorn/chunked_reader.rb @@ -32,23 +32,6 @@ module Unicorn buf end - def gets - line = nil - begin - line = readpartial(Const::CHUNK_SIZE) - begin - if line.sub!(%r{\A(.*?#{$/})}, Z) - @chunk_left += line.size - @buf = @buf ? (line << @buf) : line - return $1.dup - end - line << readpartial(Const::CHUNK_SIZE) - end while true - rescue EOFError - return line - end - end - private def last_block(max = nil) |