Skip to content

Commit 50d96a3

Browse files
committed
http: revert deprecation of client property
Reason: breaks a feature in the request module
1 parent 5d83401 commit 50d96a3

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)