Skip to content
Browse files

Merge commit 'eaturspinach/master'

  • Loading branch information...
2 parents e046f6b + d604db8 commit 570a661243b0beb1f5e0bf7826af22e0a98be904 @mohlendo committed Dec 14, 2009
Showing with 3 additions and 2 deletions.
  1. +3 −2 fu.js
View
5 fu.js
@@ -1,4 +1,5 @@
var createServer = require("http").createServer;
+var process = require("posix");
var sys = require("sys");
DEBUG = false;
@@ -69,7 +70,7 @@ fu.staticHandler = function (filename) {
}
sys.puts("loading " + filename + "...");
- var promise = process.fs.cat(filename, encoding);
+ var promise = process.cat(filename, encoding);
promise.addCallback(function (data) {
body = data;
@@ -91,7 +92,7 @@ fu.staticHandler = function (filename) {
return function (req, res) {
loadResponseData(function () {
res.sendHeader(200, headers);
- res.sendBody(body);
+ res.sendBody(body, encoding);
res.finish();
});
}

0 comments on commit 570a661

Please sign in to comment.
Something went wrong with that request. Please try again.