http: fix stalled pipeline bug
This is a two-part fix:
- Fix pending data notification in
OutgoingMessage
to notify server about flushed data too -
unconsume
socket from http parser on pause, to prevent parser from reportingPAUSED
error. Previously, nodata
events were emitted aftersocket.pause()
call. Now with all things happening in C++,socket.pause()
has no effect on internal socket while it is consumed. Switching to old mode is enough for now, we should revisit it somewhere later.
Fix: https://github.com/nodejs/node/issues/3332
R=@bnoordhuis @jasnell @trevnorris
cc @nodejs/collaborators