Mercurial Hosting > luan
diff src/luan/modules/http/impl/NotFound.java @ 1167:7e6f28c769a1
better handlers
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 08 Feb 2018 19:06:31 -0700 |
parents | 4beabb087be6 |
children |
line wrap: on
line diff
--- a/src/luan/modules/http/impl/NotFound.java Thu Feb 08 02:22:51 2018 -0700 +++ b/src/luan/modules/http/impl/NotFound.java Thu Feb 08 19:06:31 2018 -0700 @@ -6,24 +6,14 @@ public class NotFound implements Handler { - private final Handler handler; + private final LuanHandler luanHandler; - public NotFound(Handler handler) { - this.handler = handler; + public NotFound(LuanHandler luanHandler) { + this.luanHandler = luanHandler; } @Override public Response handle(Request request) { - Response response = handler.handle(request); - if( response == null ) { - String path = request.path; - try { - request.path = "/not_found"; - response = handler.handle(request); - } finally { - request.path = path; - } - } - return response; + return luanHandler.handle(request,"site:/not_found.luan"); } }