Fix test-http-buffer-sanity

This commit is contained in:
Ryan Dahl 2010-10-11 16:00:36 -07:00
parent e38eb0c5a4
commit 7e24a05cba
2 changed files with 3 additions and 3 deletions

View File

@ -322,7 +322,7 @@ OutgoingMessage.prototype._send = function (data, encoding) {
}
this._headerSent = true;
}
this._writeRaw(data, encoding);
return this._writeRaw(data, encoding);
};
OutgoingMessage.prototype._writeRaw = function(data, encoding) {
@ -347,7 +347,6 @@ OutgoingMessage.prototype._writeRaw = function(data, encoding) {
};
OutgoingMessage.prototype._buffer = function (data, encoding) {
// Buffer
if (data.length === 0) return;
var length = this.output.length;

View File

@ -665,7 +665,8 @@ Stream.prototype.write = function (data, encoding, fd) {
}
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) {
// optimization - concat onto last
this._writeQueue[this._writeQueue.length-1] += data;