diff options
author | isaacs <i@izs.me> | 2012-10-03 17:40:14 -0700 |
---|---|---|
committer | isaacs <i@izs.me> | 2012-10-03 17:40:14 -0700 |
commit | 836a06fc4f4920d5e9675763290c97aa4e7288fe (patch) | |
tree | e32f979bc193c25fbed68b2af618e81dd7e73321 /lib | |
parent | 016afe21aeb8e373e26b3554640cd5ff5f336b02 (diff) | |
download | android-node-v8-836a06fc4f4920d5e9675763290c97aa4e7288fe.tar.gz android-node-v8-836a06fc4f4920d5e9675763290c97aa4e7288fe.tar.bz2 android-node-v8-836a06fc4f4920d5e9675763290c97aa4e7288fe.zip |
Revert "http: make http.ServerResponse emit 'end'"
This reverts commit 790d651f0dfae13f1e2b799820ab18ac09f251b7.
This makes Duplex streams unworkable, and would only ever be a special
case for HTTP responses, which is not ideal.
Intead, we're going to just bless the 'finish' event for all Writable
streams in 0.10
Diffstat (limited to 'lib')
-rw-r--r-- | lib/http.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/http.js b/lib/http.js index afa55b9423..5f4d842b92 100644 --- a/lib/http.js +++ b/lib/http.js @@ -840,7 +840,7 @@ OutgoingMessage.prototype._finish = function() { assert(this instanceof ClientRequest); DTRACE_HTTP_CLIENT_REQUEST(this, this.connection); } - this.emit('end'); + this.emit('finish'); }; @@ -1780,7 +1780,7 @@ function connectionListener(socket) { // When we're finished writing the response, check if this is the last // respose, if so destroy the socket. - res.on('end', function() { + res.on('finish', function() { // Usually the first incoming element should be our request. it may // be that in the case abortIncoming() was called that the incoming // array will be empty. |