http: revert deprecation of client property

The improper deprecation of the property broke a feature in the
request module used by the bundled npm. This reverts the deprecation
part of this change.

PR-URL: https://github.com/nodejs/io.js/pull/1852
Fixes: https://github.com/nodejs/io.js/issues/1850
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Roman Reiss <me@silverwind.io>
This commit is contained in:
Michaël Zasso 2015-05-31 13:25:27 +02:00 committed by Roman Reiss
parent 5d83401086
commit 4d6b768e5d

View File

@ -47,7 +47,7 @@ function IncomingMessage(socket) {
// response (client) only // response (client) only
this.statusCode = null; this.statusCode = null;
this.statusMessage = null; this.statusMessage = null;
this._client = socket; // deprecated this.client = socket;
// flag for backwards compatibility grossness. // flag for backwards compatibility grossness.
this._consuming = false; this._consuming = false;
@ -61,16 +61,6 @@ util.inherits(IncomingMessage, Stream.Readable);
exports.IncomingMessage = IncomingMessage; 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) { IncomingMessage.prototype.setTimeout = function(msecs, callback) {
if (callback) if (callback)