From 92105ca7b31ae67a2faf23167366273ffa3a3a19 Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Tue, 13 Sep 2011 17:07:17 +0200 Subject: [PATCH] updated config file and examples --- .../src/hello_routed_world.e | 20 ++++++++++++++----- library/server/request/router/router-safe.ecf | 2 -- library/server/request/router/router.ecf | 4 +--- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/examples/hello_routed_world/src/hello_routed_world.e b/examples/hello_routed_world/src/hello_routed_world.e index daad0e8e..c34f3bcd 100644 --- a/examples/hello_routed_world/src/hello_routed_world.e +++ b/examples/hello_routed_world/src/hello_routed_world.e @@ -35,17 +35,27 @@ feature {NONE} -- Initialization setup_router local ra: REQUEST_AGENT_HANDLER [REQUEST_URI_TEMPLATE_HANDLER_CONTEXT] + rag: DEFAULT_REQUEST_URI_TEMPLATE_ROUTING_HANDLER do router.map_agent ("/home", agent execute_home) + create rag.make (3) + create ra.make (agent handle_hello) - router.map ("/hello/{name}.{format}", ra) - router.map ("/hello.{format}/{name}", ra) - router.map ("/hello/{name}", ra) + rag.map ("/hello/{name}.{format}", ra) + rag.map ("/hello.{format}/{name}", ra) + rag.map ("/hello/{name}", ra) +-- router.map ("/hello/{name}.{format}", ra) +-- router.map ("/hello.{format}/{name}", ra) +-- router.map ("/hello/{name}", ra) create ra.make (agent handle_anonymous_hello) - router.map ("/hello", ra) - router.map ("/hello.{format}", ra) + rag.map ("/hello", ra) + rag.map ("/hello.{format}", ra) +-- router.map ("/hello", ra) +-- router.map ("/hello.{format}", ra) + + router.map ("/hello", rag) router.map_agent_with_request_methods ("/method/any", agent handle_method_any, Void) router.map_agent_with_request_methods ("/method/guess", agent handle_method_get_or_post, <<"GET", "POST">>) diff --git a/library/server/request/router/router-safe.ecf b/library/server/request/router/router-safe.ecf index 040eb070..eba5a022 100644 --- a/library/server/request/router/router-safe.ecf +++ b/library/server/request/router/router-safe.ecf @@ -14,7 +14,6 @@ - @@ -32,7 +31,6 @@ - diff --git a/library/server/request/router/router.ecf b/library/server/request/router/router.ecf index 88790095..b336e855 100644 --- a/library/server/request/router/router.ecf +++ b/library/server/request/router/router.ecf @@ -7,7 +7,7 @@ /EIFGENs$ /.svn$ - @@ -15,7 +15,6 @@ - @@ -33,7 +32,6 @@ -