From 4e16e386fec675b576669e67f25efe47854ffef6 Mon Sep 17 00:00:00 2001 From: Michaeljohn Clement Date: Tue, 19 Jan 2010 15:20:26 -0500 Subject: [PATCH] set default encoding in sendBody --- lib/http.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/http.js b/lib/http.js index 1144f0b64b..32bec0d590 100644 --- a/lib/http.js +++ b/lib/http.js @@ -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);