diff --git a/web/CXM_jquery.anubis b/web/CXM_jquery.anubis index 9879d1f..703e615 100644 --- a/web/CXM_jquery.anubis +++ b/web/CXM_jquery.anubis @@ -14,6 +14,7 @@ read tools/basis.anubis public type JQuery_Actioner_type: jqform, jqlink, + jqflink, jqscript. /* jQuery Actioner */ @@ -71,6 +72,7 @@ public define String { jqform then "$('#"+str+"').submit();", jqlink then "document.location='/?a="+str+"';", + jqflink then "document.location='"+str+"';", jqscript then str }, same(label) then @@ -78,6 +80,7 @@ public define String { jqform then "$('#"+str+"').submit();", jqlink then "document.location='/?a="+str+"';", + jqflink then "document.location='"+str+"';", jqscript then str }, other(window_name, window_options) then @@ -85,6 +88,7 @@ public define String { jqform then "$('#"+str+"').submit();", //il s'agit d'une soumision d'un formulaire => cela se fait uniquement dans la même fenêtre ! jqlink then "window.open('"+str+"', '"+window_name+"', '"+jquery_button_get_onclick_action_window_options(window_options, "")+"');", + jqflink then "document.location='"+str+"';", jqscript then str } }. diff --git a/web/CXM_making_a_web_site.anubis b/web/CXM_making_a_web_site.anubis index 29e535f..8f96e9c 100644 --- a/web/CXM_making_a_web_site.anubis +++ b/web/CXM_making_a_web_site.anubis @@ -2004,7 +2004,8 @@ define ($State s) -> String // the function constructed returns the name of t ($State s) |-> with time_stamp = now+timeout, to_be_saved = (time_stamp,s), - state_name = web_arg_encode(sha1(s)), + state_name = to_ascii(sha1(s)), + //println("make_save_state_function " + state_directory+"/s"+state_name); if save(to_be_saved,state_directory+"/s"+state_name) is ok then state_name else (print("Cannot create state file in '"+state_directory+"'.\n"); ""). @@ -2292,8 +2293,13 @@ define (List(Web_arg) lwa, HTTP_Info info) -> Separated_Web_Args($State) //println("find_cookie(\"state_"+website_name+"\", ..."); if find_cookie("state_"+website_name, server_get_cookies(http_headers(info))) is { - failure then swa(not_found,failure,[]), - success(cookie) then swa(retrieve_state(value(cookie)),failure,[]) + failure then + /*println("find_cookie(\"state_"+website_name+"\" failure");*/ + swa(not_found,failure,[]), + + success(cookie) then + /*println("find_cookie(\"state_"+website_name+"\" success");*/ + swa(retrieve_state(value(cookie)),failure,[]) }, //swa(failure,failure,[]), @@ -2474,6 +2480,7 @@ define List(HTTP_header) String state_name ) = + //println("Set-Cookie state_"+website_name+"="+state_name); [ http_header("Set-Cookie", "state_"+website_name+"="+state_name) ] @@ -2553,9 +2560,11 @@ public define Web_Site }, out_of_date(state) then + //println("out_of_date"); ticket_expired_state(state, mb_action_name, http_info,operands,is_https), still_valid(state) then + //println("still_valid"); if mb_action_name is { failure then state, @@ -2568,14 +2577,15 @@ public define Web_Site //println("Cookie new STATE NAME "+state_name); with cookie_headers = if mb_action_name is { - failure then [], + failure then + make_state_cookie_headers(website_name, state_name), success(action_name) then - if action_name = "none" then - [] - else if substr(action_name, 0, 5)="ajax_" then - [] - else - make_state_cookie_headers(website_name, state_name) + if action_name = "none" then + [] + else if substr(action_name, 0, 5)="ajax_" then + [] + else + make_state_cookie_headers(website_name, state_name) }, format(info(host_name, http_port, https_port, site_directory, secret), -- libgit2 0.21.4