tee_input: do not #dup string buffers
commita31af29a22cb22072828391d8f421ccf6c59d9b5
authorEric Wong <normalperson@yhbt.net>
Sun, 28 Feb 2010 03:06:10 +0000 (27 19:06 -0800)
committerEric Wong <normalperson@yhbt.net>
Sun, 28 Feb 2010 03:13:24 +0000 (27 19:13 -0800)
tree51033b6bc13a3f73b985bd61e3ab7d608e359b2a
parenta5f4d11cdb9465b1ffa2892b3d84ee53b8962930
tee_input: do not #dup string buffers

It's a waste of memory bandwidth to do memcpy() when we know
Unicorn::HttpParser (via rb_str_resize()) will allocate new
memory for the string for us.  An empty String is "free",
as we've already paid the Object cost regardless.
lib/unicorn/tee_input.rb