Merge pull request #9 from alexyan/master

404
This commit is contained in:
想当当 2014-09-05 18:14:41 +08:00
commit e73cbb1206
2 changed files with 33 additions and 1 deletions

View File

@ -171,7 +171,12 @@ function userRequestHandler(req,userRes){
//send response //send response
},function(callback){ },function(callback){
userRes.end(serverResData); if(404 == statusCode){
var html404path = pathUtil.join(__dirname, '..', 'web', '404.html');
userRes.end(fs.readFileSync(html404path));
}else{
userRes.end(serverResData);
}
callback(); callback();
//udpate record info //udpate record info

27
web/404.html Normal file

File diff suppressed because one or more lines are too long