Browse Source

Fix test-http-buffer-sanity

v0.7.4-release
Ryan Dahl 14 years ago
parent
commit
7e24a05cba
  1. 3
      lib/http.js
  2. 3
      lib/net.js

3
lib/http.js

@ -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;

3
lib/net.js

@ -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;

Loading…
Cancel
Save