tee_input: restore read position after #size
commit17a734a9f6ccea8c969a574f09b5d8dd3d568a9c
authorEric Wong <normalperson@yhbt.net>
Sat, 13 Nov 2010 08:41:10 +0000 (13 16:41 +0800)
committerEric Wong <normalperson@yhbt.net>
Sat, 13 Nov 2010 08:41:10 +0000 (13 16:41 +0800)
tree30c3b8cccaa7b4807d105feebf6766166ad8e6b8
parent855c02a9720a17854a2f1c715efbe502cdba54e2
tee_input: restore read position after #size

It's possible for an application to call size after it has read
a few bytes/lines, so do not screw up a user's read offset when
consuming input.
lib/unicorn/tee_input.rb
test/unit/test_tee_input.rb