Browse Source

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>
v2.3.1-release
Michaël Zasso 10 years ago
committed by Roman Reiss
parent
commit
4d6b768e5d
  1. 12
      lib/_http_incoming.js

12
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)

Loading…
Cancel
Save