summaryrefslogtreecommitdiff
path: root/lib/_http_incoming.js
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2013-08-15 11:15:10 -0700
committerisaacs <i@izs.me>2013-08-15 15:05:41 -0700
commitdf23ce138fbe4584a72d24e1f3e6858cf518f302 (patch)
tree26469f1b66b84ff3347b1202be583f89cfd1a4f6 /lib/_http_incoming.js
parent7c9b607048f13741173d397795bac37707405ba7 (diff)
downloadandroid-node-v8-df23ce138fbe4584a72d24e1f3e6858cf518f302.tar.gz
android-node-v8-df23ce138fbe4584a72d24e1f3e6858cf518f302.tar.bz2
android-node-v8-df23ce138fbe4584a72d24e1f3e6858cf518f302.zip
http: Simplify IncomingMessage._dump method
Diffstat (limited to 'lib/_http_incoming.js')
-rw-r--r--lib/_http_incoming.js13
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/_http_incoming.js b/lib/_http_incoming.js
index 8949d4571a..cc93bfc9f1 100644
--- a/lib/_http_incoming.js
+++ b/lib/_http_incoming.js
@@ -23,14 +23,14 @@ var util = require('util');
var Stream = require('stream');
function readStart(socket) {
- if (!socket || !socket._handle || !socket._handle.readStart) return;
- socket._handle.readStart();
+ if (socket)
+ socket.resume();
}
exports.readStart = readStart;
function readStop(socket) {
- if (!socket || !socket._handle || !socket._handle.readStop) return;
- socket._handle.readStop();
+ if (socket)
+ socket.pause();
}
exports.readStop = readStop;
@@ -196,9 +196,6 @@ IncomingMessage.prototype._addHeaderLine = function(field, value, dest) {
IncomingMessage.prototype._dump = function() {
if (!this._dumped) {
this._dumped = true;
- if (this.socket.parser) this.socket.parser.incoming = null;
- this.push(null);
- readStart(this.socket);
- this.read();
+ this.resume();
}
};