From c8de5f4b9f86d0a6d2942a767212265cc05011d8 Mon Sep 17 00:00:00 2001 From: yekolia Date: Thu, 18 Oct 2012 17:10:00 +0000 Subject: [PATCH] Adding some support for ajax with "no sending cookie". --- web/CXM_making_a_web_site.anubis | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/web/CXM_making_a_web_site.anubis b/web/CXM_making_a_web_site.anubis index 6c221ea..cd07d6e 100644 --- a/web/CXM_making_a_web_site.anubis +++ b/web/CXM_making_a_web_site.anubis @@ -2406,8 +2406,17 @@ public define Web_Site //if state_and_headers is (session_ticket, mb_new_state, headers) then with state_name = save_state(new_state), //println("Cookie new STATE NAME "+state_name); - with cookie_headers = /* if using_state_cookies then */ make_state_cookie_headers(state_name) /*else [] */, - format(info(host_name, http_port, https_port, site_directory, secret), + with cookie_headers = if mb_action_name is + { + failure then [], + success(action_name) then + if substr(action_name, 0, 5)="ajax_" then + [] + else + make_state_cookie_headers(state_name) + }, + + format(info(host_name, http_port, https_port, site_directory, secret), state_name, additional_headers(new_state) + cookie_headers, compute_page(new_state), -- libgit2 0.21.4