Commit c8de5f4b9f86d0a6d2942a767212265cc05011d8
1 parent
636f0722
Adding some support for ajax with "no sending cookie".
Showing
1 changed file
with
11 additions
and
2 deletions
Show diff stats
web/CXM_making_a_web_site.anubis
| ... | ... | @@ -2406,8 +2406,17 @@ public define Web_Site |
| 2406 | 2406 | //if state_and_headers is (session_ticket, mb_new_state, headers) then |
| 2407 | 2407 | with state_name = save_state(new_state), |
| 2408 | 2408 | //println("Cookie new STATE NAME "+state_name); |
| 2409 | - with cookie_headers = /* if using_state_cookies then */ make_state_cookie_headers(state_name) /*else [] */, | |
| 2410 | - format(info(host_name, http_port, https_port, site_directory, secret), | |
| 2409 | + with cookie_headers = if mb_action_name is | |
| 2410 | + { | |
| 2411 | + failure then [], | |
| 2412 | + success(action_name) then | |
| 2413 | + if substr(action_name, 0, 5)="ajax_" then | |
| 2414 | + [] | |
| 2415 | + else | |
| 2416 | + make_state_cookie_headers(state_name) | |
| 2417 | + }, | |
| 2418 | + | |
| 2419 | + format(info(host_name, http_port, https_port, site_directory, secret), | |
| 2411 | 2420 | state_name, |
| 2412 | 2421 | additional_headers(new_state) + cookie_headers, |
| 2413 | 2422 | compute_page(new_state), | ... | ... |