From e15ab1576b7186e05d36425b7874d6cac6d786e3 Mon Sep 17 00:00:00 2001 From: Cedric RICARD Date: Thu, 3 Jan 2008 09:54:59 +0000 Subject: [PATCH] [+] A function can be specified a redirection handler. [+] An external link can be added as 'Refresh' Meta-Tag --- calexium_lib/web/CXM_common.anubis | 5 ++++- calexium_lib/web/CXM_making_a_web_site.anubis | 16 ++++------------ calexium_lib/web/CXM_multihost_http_server.anubis | 17 +++++++++++------ 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/calexium_lib/web/CXM_common.anubis b/calexium_lib/web/CXM_common.anubis index 2acb678..5578e78 100644 --- a/calexium_lib/web/CXM_common.anubis +++ b/calexium_lib/web/CXM_common.anubis @@ -130,8 +130,11 @@ public type Redirection: redirect(String required_uri, // URI required by the client String required_host, // value of 'Host' HTTP header sent by the client String corresponding_uri). // URI which will be served to the client - +public type Redirections: + redirection_list(List(Redirection) redirections), + redirection_fn((String input_uri, // URI required by the client + String host) -> String f). // value of 'Host' HTTP header sent by the client Now, you may also want to recover web argument values which have been encoded (by diff --git a/calexium_lib/web/CXM_making_a_web_site.anubis b/calexium_lib/web/CXM_making_a_web_site.anubis index e7f15df..e2b9ce3 100644 --- a/calexium_lib/web/CXM_making_a_web_site.anubis +++ b/calexium_lib/web/CXM_making_a_web_site.anubis @@ -1391,6 +1391,7 @@ public type HTML_Meta: Actioner_Target target, String action_name, Int32 delay), // in seconds + refresh (String url, Int32 delay), // in seconds meta (String name, String content), http_equiv (String name, String content), generic_meta (List((String,String))), @@ -2143,17 +2144,6 @@ define Printable_tree percentage(x) then ["\"",x,"%\""] }. -define Printable_tree - top_redirection_page - ( - String common_name - ) = - [ doctype_w3c_header, - "", - "", - "" - ]. - public define Web_Site make_web_site_description ( @@ -2176,7 +2166,7 @@ public define Web_Site List(Web_Action($SessionTicket, $State)) actions, (Maybe($SessionTicket), Maybe($State)) -> HTML_Page compute_page, Int32 timeout, - List(Redirection) redirections, + Redirections redirections, String charset, List(String) journal_extensions, List(String) journal_headers, @@ -3982,6 +3972,8 @@ define Printable_tree refresh(co,ta,an,delay) then ["\n"], + refresh(url,delay) then + ["\n"], meta(n,c) then ["\n"], http_equiv(n,c) then ["\n"], generic_meta(l) then ["