|
|
@ -313,7 +313,7 @@ exports.IncomingMessage = IncomingMessage; |
|
|
|
IncomingMessage.prototype.read = function(n) { |
|
|
|
this._consuming = true; |
|
|
|
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); |
|
|
|
|
|
|
|
// 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.
|
|
|
|
if (!handled) |
|
|
|
res._dump(); |
|
|
@ -1845,7 +1845,7 @@ function connectionListener(socket) { |
|
|
|
incoming.shift(); |
|
|
|
|
|
|
|
// 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.
|
|
|
|
if (!req._consuming) |
|
|
|
req._dump(); |
|
|
|