http: write buffers when chunked to embrace writev
This commit is contained in:
parent
60ed2c5434
commit
df8a4f8f07
@ -413,9 +413,15 @@ OutgoingMessage.prototype.write = function(chunk, encoding) {
|
|||||||
} else {
|
} else {
|
||||||
// buffer, or a non-toString-friendly encoding
|
// buffer, or a non-toString-friendly encoding
|
||||||
len = chunk.length;
|
len = chunk.length;
|
||||||
this._send(len.toString(16) + CRLF);
|
|
||||||
this._send(chunk, encoding);
|
if (this.connection)
|
||||||
ret = this._send(CRLF);
|
this.connection.cork();
|
||||||
|
this._send(len.toString(16));
|
||||||
|
this._send(crlf_buf);
|
||||||
|
this._send(chunk);
|
||||||
|
ret = this._send(crlf_buf);
|
||||||
|
if (this.connection)
|
||||||
|
this.connection.uncork();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ret = this._send(chunk, encoding);
|
ret = this._send(chunk, encoding);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user