Route class should be a constant

This commit is contained in:
斟酌 鵬兄 2017-09-26 12:52:42 +08:00
parent 10f1563c4a
commit d94cd5f978

View File

@ -6,6 +6,7 @@ const cl = global.botanLoader;
const Dragonfly = global.Dragonfly;
const PageCache = global.botanPageCache;
const Router = cl.load( "botanss.net.Router" );
const CondStream = cl.load( "botanss.utils.CondStream" );
const FatalError = cl.load( "botanss.errors.FatalError" );
@ -22,8 +23,6 @@ class WebFrame
this.requestStr = "";
this.requestObj = {};
var Router = cl.load( "botanss.net.Router" );
var router = new Router( Http );
router.addRoute( "301", false, "301" );
router.addRoute( "302", false, "302" );