tls: don't push() incoming data when ondata is set
authorNathan Rajlich <nathan@tootallnate.net>
Thu, 12 Sep 2013 01:18:10 +0000 (18:18 -0700)
committerNathan Rajlich <nathan@tootallnate.net>
Fri, 13 Sep 2013 17:08:35 +0000 (10:08 -0700)
commit7196742852c9da5d29e2fb1e333bca9d21c8e205
tree1d2422ba20a4fcd4f55d6fd0da6460b6a1b707f6
parent9fad8e5dc440b07507039d617bbaadc0be98edb5
tls: don't push() incoming data when ondata is set

Otherwise the data ends up "on the wire" twice, and
switching between consuming the stream using `ondata`
vs. `read()` would yield duplicate data, which was bad.
lib/tls.js
test/simple/test-tls-ondata.js [new file with mode: 0644]