diff options
author | Brian White <mscdex@mscdex.net> | 2015-05-01 21:37:05 -0400 |
---|---|---|
committer | Brian White <mscdex@mscdex.net> | 2015-05-25 01:07:22 -0400 |
commit | 1eec5f091ab00860539ac2474e47232b31925cea (patch) | |
tree | bb6d0c08e4aeb39ef3b7da6988dbbfd26130696b /lib/_http_incoming.js | |
parent | ba76a9d872f98c73faa9ced7872ca536c8aa8b54 (diff) | |
download | android-node-v8-1eec5f091ab00860539ac2474e47232b31925cea.tar.gz android-node-v8-1eec5f091ab00860539ac2474e47232b31925cea.tar.bz2 android-node-v8-1eec5f091ab00860539ac2474e47232b31925cea.zip |
http: simplify code and remove unused properties
PR-URL: https://github.com/nodejs/io.js/pull/1572
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Diffstat (limited to 'lib/_http_incoming.js')
-rw-r--r-- | lib/_http_incoming.js | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/_http_incoming.js b/lib/_http_incoming.js index b371c7d7a5..295a3ef4bd 100644 --- a/lib/_http_incoming.js +++ b/lib/_http_incoming.js @@ -38,8 +38,6 @@ function IncomingMessage(socket) { this.readable = true; - this._pendings = []; - this._pendingIndex = 0; this.upgrade = null; // request (server) only @@ -49,7 +47,7 @@ function IncomingMessage(socket) { // response (client) only this.statusCode = null; this.statusMessage = null; - this.client = this.socket; + this._client = socket; // deprecated // flag for backwards compatibility grossness. this._consuming = false; @@ -63,6 +61,16 @@ 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) |