Skip to content

Commit 4d6b768

Browse files
targossilverwind
authored andcommitted
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: #1852 Fixes: #1850 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Roman Reiss <me@silverwind.io>
1 parent 5d83401 commit 4d6b768

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

lib/_http_incoming.js

+1-11
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function IncomingMessage(socket) {
4747
// response (client) only
4848
this.statusCode = null;
4949
this.statusMessage = null;
50-
this._client = socket; // deprecated
50+
this.client = socket;
5151

5252
// flag for backwards compatibility grossness.
5353
this._consuming = false;
@@ -61,16 +61,6 @@ util.inherits(IncomingMessage, Stream.Readable);
6161

6262
exports.IncomingMessage = IncomingMessage;
6363

64-
Object.defineProperty(IncomingMessage.prototype, 'client', {
65-
configurable: true,
66-
enumerable: true,
67-
get: util.deprecate(function() {
68-
return this._client;
69-
}, 'client is deprecated, use socket or connection instead'),
70-
set: util.deprecate(function(val) {
71-
this._client = val;
72-
}, 'client is deprecated, use socket or connection instead')
73-
});
7464

7565
IncomingMessage.prototype.setTimeout = function(msecs, callback) {
7666
if (callback)

0 commit comments

Comments
 (0)