From fad5d5f1520beb39b722985a88308ac6261a4954 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sun, 31 May 2015 13:25:27 +0200 Subject: [PATCH] http: revert deprecation of client property Reason: breaks a feature in the request module used by the bundled npm --- lib/_http_incoming.js | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/lib/_http_incoming.js b/lib/_http_incoming.js index 295a3ef4bd257b..e16f198dba71bd 100644 --- a/lib/_http_incoming.js +++ b/lib/_http_incoming.js @@ -47,7 +47,7 @@ function IncomingMessage(socket) { // response (client) only this.statusCode = null; this.statusMessage = null; - this._client = socket; // deprecated + this.client = socket; // flag for backwards compatibility grossness. this._consuming = false; @@ -61,16 +61,6 @@ 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)