Mercurial Hosting > luan
view src/luan/modules/http/NotFound.java @ 1402:27efb1fcbcb5
move luan.lib to goodjava
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 17 Sep 2019 01:35:01 -0400 |
parents | a3d0d1c2ce89 |
children |
line wrap: on
line source
package luan.modules.http; import goodjava.webserver.Request; import goodjava.webserver.Response; import goodjava.webserver.Handler; public class NotFound implements Handler { private final Handler handler; public NotFound(Handler handler) { this.handler = handler; } @Override public Response handle(Request request) { request.headers.put(LuanHandler.NOT_FOUND,"whatever"); try { return handler.handle(request); } finally { request.headers.remove(LuanHandler.NOT_FOUND); } } }