From f690ee2b6e0294ecb3b21ca7cb8f686b9a436851 Mon Sep 17 00:00:00 2001 From: Brian White Date: Fri, 1 May 2015 02:17:13 -0400 Subject: [PATCH] http: clean up dead code and unused properties --- lib/_http_common.js | 6 ------ lib/_http_incoming.js | 3 --- lib/_http_outgoing.js | 7 ++----- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/lib/_http_common.js b/lib/_http_common.js index 7861848b46a9d4..757032929444b1 100644 --- a/lib/_http_common.js +++ b/lib/_http_common.js @@ -126,12 +126,6 @@ function parserOnMessageComplete() { parser._url = ''; } - if (!stream.upgrade) - // For upgraded connections, also emit this after parser.execute - stream.push(null); - } - - if (stream && !parser.incoming._pendings.length) { // For emit end event stream.push(null); } diff --git a/lib/_http_incoming.js b/lib/_http_incoming.js index 41ece371cdfbe6..499b4774c5e41b 100644 --- a/lib/_http_incoming.js +++ b/lib/_http_incoming.js @@ -38,8 +38,6 @@ function IncomingMessage(socket) { this.readable = true; - this._pendings = []; - this._pendingIndex = 0; this.upgrade = null; // request (server) only @@ -49,7 +47,6 @@ function IncomingMessage(socket) { // response (client) only this.statusCode = null; this.statusMessage = null; - this.client = this.socket; // flag for backwards compatibility grossness. this._consuming = false; diff --git a/lib/_http_outgoing.js b/lib/_http_outgoing.js index 88590551c9defb..f957f292e300d1 100644 --- a/lib/_http_outgoing.js +++ b/lib/_http_outgoing.js @@ -62,7 +62,6 @@ function OutgoingMessage() { this._trailer = ''; this.finished = false; - this._hangupClose = false; this._headerSent = false; this.socket = null; @@ -148,8 +147,7 @@ OutgoingMessage.prototype._writeRaw = function(data, encoding, callback) { var outputEncodings = this.outputEncodings; var outputCallbacks = this.outputCallbacks; for (var i = 0; i < outputLength; i++) { - connection.write(output[i], outputEncodings[i], - outputCallbacks[i]); + connection.write(output[i], outputEncodings[i], outputCallbacks[i]); } this.output = []; @@ -613,8 +611,7 @@ OutgoingMessage.prototype._flush = function() { var outputEncodings = this.outputEncodings; var outputCallbacks = this.outputCallbacks; for (var i = 0; i < outputLength; i++) { - ret = socket.write(output[i], outputEncodings[i], - outputCallbacks[i]); + ret = socket.write(output[i], outputEncodings[i], outputCallbacks[i]); } this.output = [];