http: Trivial fix for comments and 'this.read'
This commit is contained in:
parent
ec7455558f
commit
c048c814c7
@ -313,7 +313,7 @@ exports.IncomingMessage = IncomingMessage;
|
|||||||
IncomingMessage.prototype.read = function(n) {
|
IncomingMessage.prototype.read = function(n) {
|
||||||
this._consuming = true;
|
this._consuming = true;
|
||||||
this.read = Stream.Readable.prototype.read;
|
this.read = Stream.Readable.prototype.read;
|
||||||
return Stream.Readable.prototype.read.call(this, n);
|
return this.read(n);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -1518,7 +1518,7 @@ function parserOnIncomingClient(res, shouldKeepAlive) {
|
|||||||
res.on('end', responseOnEnd);
|
res.on('end', responseOnEnd);
|
||||||
|
|
||||||
// If the user did not listen for the 'response' event, then they
|
// If the user did not listen for the 'response' event, then they
|
||||||
// can't possibly read the data, so we .resume() it into the void
|
// can't possibly read the data, so we ._dump() it into the void
|
||||||
// so that the socket doesn't hang there in a paused state.
|
// so that the socket doesn't hang there in a paused state.
|
||||||
if (!handled)
|
if (!handled)
|
||||||
res._dump();
|
res._dump();
|
||||||
@ -1845,7 +1845,7 @@ function connectionListener(socket) {
|
|||||||
incoming.shift();
|
incoming.shift();
|
||||||
|
|
||||||
// if the user never called req.read(), and didn't pipe() or
|
// if the user never called req.read(), and didn't pipe() or
|
||||||
// .resume() or .on('data'), then we call req.resume() so that the
|
// .resume() or .on('data'), then we call req._dump() so that the
|
||||||
// bytes will be pulled off the wire.
|
// bytes will be pulled off the wire.
|
||||||
if (!req._consuming)
|
if (!req._consuming)
|
||||||
req._dump();
|
req._dump();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user