Added default 400

This commit is contained in:
斟酌 鵬兄 2016-10-17 15:39:29 +08:00
parent 16618e5165
commit 3c347df812

View File

@ -25,6 +25,7 @@ class WebFrame
var router = new Router( Http );
router.addRoute( "301", false, "301" );
router.addRoute( "302", false, "302" );
router.addRoute( "400", false, "400" );
router.addRoute( "403", false, "403" );
router.addRoute( "404", false, "404" );
router.addRoute( "500", false, "500" );
@ -41,6 +42,12 @@ class WebFrame
_self.result = "403 Forbidden";
_self.plantResult();
}
, "400": function()
{
res.statusCode = 404;
_self.result = "400 Bad Request";
_self.plantResult();
}
, "404": function()
{
res.statusCode = 404;