summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2012-10-03 17:40:14 -0700
committerisaacs <i@izs.me>2012-10-03 17:40:14 -0700
commit836a06fc4f4920d5e9675763290c97aa4e7288fe (patch)
treee32f979bc193c25fbed68b2af618e81dd7e73321 /lib
parent016afe21aeb8e373e26b3554640cd5ff5f336b02 (diff)
downloadandroid-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.js4
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.