http: Refactor for streams2
authorisaacs <i@izs.me>
Thu, 13 Dec 2012 06:24:17 +0000 (22:24 -0800)
committerisaacs <i@izs.me>
Sat, 15 Dec 2012 01:46:23 +0000 (17:46 -0800)
commit1d369317ea449424b98aec645f12b0d9e43876d6
tree3a678e9f0c3f876a3c62d5c3389061a2cda9f4ca
parent81e356279dcd37fda20d827fbab3550026e74c63
http: Refactor for streams2

Because of some of the peculiarities of http, this has a bit of special
magic to handle cases where the IncomingMessage would wait forever in a
paused state.

In the server, if you do not begin consuming the request body by the
time the response emits 'finish', then it will be flushed out.

In the client, if you do not add a 'response' handler onto the request,
then the response stream will be flushed out.
lib/http.js