summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/_http_common.js6
-rw-r--r--lib/_http_incoming.js14
-rw-r--r--lib/_http_outgoing.js1
3 files changed, 11 insertions, 10 deletions
diff --git a/lib/_http_common.js b/lib/_http_common.js
index 7861848b46..7570329294 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 b371c7d7a5..295a3ef4bd 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,7 @@ function IncomingMessage(socket) {
// response (client) only
this.statusCode = null;
this.statusMessage = null;
- this.client = this.socket;
+ this._client = socket; // deprecated
// flag for backwards compatibility grossness.
this._consuming = false;
@@ -63,6 +61,16 @@ util.inherits(IncomingMessage, Stream.Readable);
exports.IncomingMessage = IncomingMessage;
+Object.defineProperty(IncomingMessage.prototype, 'client', {
+ configurable: true,
+ enumerable: true,
+ get: util.deprecate(function() {
+ return this._client;
+ }, 'client is deprecated, use socket or connection instead'),
+ set: util.deprecate(function(val) {
+ this._client = val;
+ }, 'client is deprecated, use socket or connection instead')
+});
IncomingMessage.prototype.setTimeout = function(msecs, callback) {
if (callback)
diff --git a/lib/_http_outgoing.js b/lib/_http_outgoing.js
index 9726ca9e9c..6ebf716fab 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;