[Pkg-javascript-commits] [node-static] 01/07: Sober 404 error message without the 500kB image

Jérémy Lal kapouer at moszumanska.debian.org
Fri Jan 10 22:55:12 UTC 2014


This is an automated email from the git hooks/post-receive script.

kapouer pushed a commit to branch master
in repository node-static.

commit d5e97aadd60e5e882d4e415177fb1249abeea6f7
Author: Jérémy Lal <kapouer at melix.org>
Date:   Wed Jan 8 01:12:38 2014 +0100

    Sober 404 error message without the 500kB image
---
 bin/cli.js | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/bin/cli.js b/bin/cli.js
index 632b112..22bea9f 100755
--- a/bin/cli.js
+++ b/bin/cli.js
@@ -39,11 +39,6 @@ var fs = require('fs'),
 
     var dir = argv._[0] || '.';
 
-    var trainwreck = fs.readFileSync(path.join(__dirname, '../etc/trainwreck.jpg')),
-				notFound = fs.readFileSync(path.join(__dirname, '../etc/404.html'))
-        .toString()
-        .replace('{{trainwreck}}', trainwreck.toString('base64'));
-
     var colors = require('colors');
 
     var log = function(request, response, statusCode) {
@@ -91,7 +86,7 @@ require('http').createServer(function (request, response) {
         file.serve(request, response, function(e, rsp) {
             if (e && e.status === 404) {
                 response.writeHead(e.status, e.headers);
-                response.end(notFound);
+                response.end("Not Found");
                 log(request, response);
             } else {
                 log(request, response);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-static.git



More information about the Pkg-javascript-commits mailing list