Skip to content

Commit

Permalink
http: revert deprecation of client property
Browse files Browse the repository at this point in the history
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: #1852
Fixes: #1850
Reviewed-By: Jeremiah Senkpiel <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
  • Loading branch information
targos authored and silverwind committed May 31, 2015
1 parent 5d83401 commit 4d6b768
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions lib/_http_incoming.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
Expand Down

0 comments on commit 4d6b768

Please sign in to comment.