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:
parent
5d83401086
commit
4d6b768e5d
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user