From dd451800c738723291ba0be3ffa369d32ad4eb3d Mon Sep 17 00:00:00 2001 From: Jermolene Date: Tue, 11 Feb 2014 19:42:45 +0000 Subject: [PATCH] Specify encoding for incoming requests Fixes #397 --- core/modules/commands/server.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/modules/commands/server.js b/core/modules/commands/server.js index e5468e7c7..820aab071 100644 --- a/core/modules/commands/server.js +++ b/core/modules/commands/server.js @@ -108,6 +108,9 @@ SimpleServer.prototype.listen = function(port,host) { response.end(); return; } + // Set the encoding for the incoming request + // TODO: Presumably this would need tweaking if we supported PUTting binary tiddlers + request.setEncoding("utf8"); // Dispatch the appropriate method switch(request.method) { case "GET": // Intentional fall-through