1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-02-02 12:19:11 +00:00

Specify encoding for incoming requests

Fixes #397
This commit is contained in:
Jermolene 2014-02-11 19:42:45 +00:00
parent 190ced7cdd
commit dd451800c7

View File

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