nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
13da69b
)
lib/popcorn: extract Router::handler_in private service
author
Alexandre Terrasa
<alexandre@moz-code.org>
Mon, 23 May 2016 20:50:38 +0000
(16:50 -0400)
committer
Alexandre Terrasa
<alexandre@moz-code.org>
Wed, 25 May 2016 03:37:13 +0000
(23:37 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
lib/popcorn/pop_handlers.nit
patch
|
blob
|
history
diff --git
a/lib/popcorn/pop_handlers.nit
b/lib/popcorn/pop_handlers.nit
index
2ce4755
..
2f438ef
100644
(file)
--- a/
lib/popcorn/pop_handlers.nit
+++ b/
lib/popcorn/pop_handlers.nit
@@
-317,6
+317,10
@@
class Router
redef fun handle(route, uri, req, res) do
if not route.match(uri) then return
+ handle_in(route, uri, req, res)
+ end
+
+ private fun handle_in(route: AppRoute, uri: String, req: HttpRequest, res: HttpResponse) do
for hroute, handler in handlers do
handler.handle(hroute, route.uri_root(uri), req, res)
if res.sent then break