Fix test-http-buffer-sanity
This commit is contained in:
parent
e38eb0c5a4
commit
7e24a05cba
@ -322,7 +322,7 @@ OutgoingMessage.prototype._send = function (data, encoding) {
|
|||||||
}
|
}
|
||||||
this._headerSent = true;
|
this._headerSent = true;
|
||||||
}
|
}
|
||||||
this._writeRaw(data, encoding);
|
return this._writeRaw(data, encoding);
|
||||||
};
|
};
|
||||||
|
|
||||||
OutgoingMessage.prototype._writeRaw = function(data, encoding) {
|
OutgoingMessage.prototype._writeRaw = function(data, encoding) {
|
||||||
@ -347,7 +347,6 @@ OutgoingMessage.prototype._writeRaw = function(data, encoding) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
OutgoingMessage.prototype._buffer = function (data, encoding) {
|
OutgoingMessage.prototype._buffer = function (data, encoding) {
|
||||||
// Buffer
|
|
||||||
if (data.length === 0) return;
|
if (data.length === 0) return;
|
||||||
|
|
||||||
var length = this.output.length;
|
var length = this.output.length;
|
||||||
|
@ -665,7 +665,8 @@ Stream.prototype.write = function (data, encoding, fd) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (typeof data == 'string' &&
|
if (typeof data == 'string' &&
|
||||||
this._writeQueueEncoding.length &&
|
this._writeQueue.length &&
|
||||||
|
typeof this._writeQueue[this._writeQueue.length-1] === 'string' &&
|
||||||
this._writeQueueEncoding[this._writeQueueEncoding.length-1] === encoding) {
|
this._writeQueueEncoding[this._writeQueueEncoding.length-1] === encoding) {
|
||||||
// optimization - concat onto last
|
// optimization - concat onto last
|
||||||
this._writeQueue[this._writeQueue.length-1] += data;
|
this._writeQueue[this._writeQueue.length-1] += data;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user