mirror of
https://github.com/nodejs/node-v0.x-archive.git
synced 2026-04-28 03:01:10 -04:00
set default encoding in sendBody
This commit is contained in:
committed by
Ryan Dahl
parent
6e3d12f617
commit
4e16e386fe
@@ -205,6 +205,7 @@ OutgoingMessage.prototype.sendHeaderLines = function (first_line, headers) {
|
||||
};
|
||||
|
||||
OutgoingMessage.prototype.sendBody = function (chunk, encoding) {
|
||||
encoding = encoding || "ascii";
|
||||
if (this.chunked_encoding) {
|
||||
this.send(process._byteLength(chunk, encoding).toString(16));
|
||||
this.send(CRLF);
|
||||
|
||||
Reference in New Issue
Block a user