Commit c5c6fea11ac3b6df26fe7b7650f1a647731fb6dc

Authored by Julien Verneuil
2 parents 3253fb48 50b6dd00

Merge branch 'release/ANUBIS_1_14' of ssh://gitlab.calexium.com:33022/calexium/c…

…alexium_lib into release/ANUBIS_1_14

Conflicts:
	database/vtm/view_table_renderer.anubis
database/vtm/view_table_renderer.anubis
... ... @@ -205,8 +205,12 @@ public define HTML_Partial_Content
205 205 partial_content(
206 206 div( [/*class("tableau")*/],
207 207 sequence(
  208 +<<<<<<< HEAD
208 209 [
209 210 partial(jquery_button(jQuery_button(button, "edit_table_"+rows.table_name, "", _T("NEW"), jQuery_actioner(same, jqlink, "edit_table&table_name="+rows.table_name)))),
  211 +=======
  212 + [ partial(jquery_button(jQuery_button(button, "", _T("NEW"), jQuery_actioner(same, jqlink, "table_name"), jq_icon_none, jq_icon_none)))/*actioner(same,same, link([class("my_button")],_T("NEW")),"edit_table",[("table_name", rows.table_name)])*/,
  213 +>>>>>>> 50b6dd00541faf76383aa5ad807b547c3f882842
210 214 //dialog used by datatable entries
211 215 partial(jq_dialog_create(dialog_id(action_name+"_dlg_ajax"), ajax("?a=ajax_edit_table&table_name="+rows.table_name))),
212 216  
... ...
web/CXM_jquery.anubis
... ... @@ -126,7 +126,7 @@ define List(HTML_Head_Tag)
126 126 jquery_defaults
127 127 =
128 128 [
129   - js(js_file("/js/jquery/jquery-1.11.3.js")),
  129 + js(js_file("/js/jquery/jquery-1.11.3.min.js")),
130 130 js(js_file("/js/jquery/jquery-ui-1.11.4/jquery-ui.min.js")),
131 131 ].
132 132  
... ...
web/CXM_making_a_web_site.anubis
... ... @@ -2695,12 +2695,14 @@ public define Start_Web_Sites_Result
2695 2695 with http_server_r =
2696 2696 start_http_server(ip_address,http_port,
2697 2697 map(get_description,web_sites),
2698   - load_denial_of_service_info),
  2698 + load_denial_of_service_info,
  2699 + shutdown_required),
2699 2700 with https_server_r =
2700 2701 start_https_server(ip_address,https_port,
2701 2702 ssl_certificate_common_name,
2702 2703 map(get_description,web_sites),
2703   - load_denial_of_service_info),
  2704 + load_denial_of_service_info,
  2705 + shutdown_required),
2704 2706 if http_server_r is ok(http_server)
2705 2707 then
2706 2708 (
... ...
web/CXM_multihost_http_server.anubis
... ... @@ -3168,12 +3168,17 @@ define One
3168 3168 BufferedConnection connection,
3169 3169 Bool is_https,
3170 3170 DenialOfService dos,
3171   - SState s
  3171 + SState s,
  3172 + (One) -> Bool shutdown_required
3172 3173 ) =
3173 3174 //t0 <- (UTime)unow;
3174 3175 with start_time = (Int)now,
3175 3176 s.sttm <- start_time;
3176 3177 //println("Request time: " + format_http_date(start_time));
  3178 + if shutdown_required(unique) then
  3179 + println("shutdown required on http_https_handler");
  3180 + unique
  3181 + else
3177 3182 if dos is denial_of_service(mc_v,rld_v,hd_v,ad_v,ld_v,ra_v) then
3178 3183 if remote_IP_address_and_port(connection.conn) is (ip_addr,port) then
3179 3184 if read_request_line(connection) is
... ... @@ -3210,7 +3215,7 @@ define One
3210 3215 ok(body) then
3211 3216 www_url_answer(host_name, desc, connection.conn, ip_addr, rqline2, headers, body, generate_tt);
3212 3217 //it's HTTP 1.1 keep-alive is default
3213   - http_https_handler(sites, connection, is_https, dos, s)
  3218 + http_https_handler(sites, connection, is_https, dos, s, shutdown_required)
3214 3219 }
3215 3220 //MULTIPART_FORM_DATA
3216 3221 multipart_form_data then
... ... @@ -3250,7 +3255,7 @@ define One
3250 3255 multipart_form_data_answer(host_name, desc, connection.conn, ip_addr, rqline2, headers, desc.site_directory + tmp_body_file, generate_tt, s);
3251 3256  
3252 3257 //it's HTTP 1.1 keep-alive is default
3253   - http_https_handler(sites, connection, is_https, dos, s)
  3258 + http_https_handler(sites, connection, is_https, dos, s, shutdown_required)
3254 3259  
3255 3260 else
3256 3261 println("Can't copy data from stream to temporary file "),
... ... @@ -3264,7 +3269,7 @@ define One
3264 3269 multipart_form_data_answer(host_name, desc, connection.conn, ip_addr, rqline2, headers, desc.site_directory + tmp_body_file, generate_tt, s);
3265 3270  
3266 3271 //it's HTTP 1.1 keep-alive is default
3267   - http_https_handler(sites, connection, is_https, dos, s)
  3272 + http_https_handler(sites, connection, is_https, dos, s, shutdown_required)
3268 3273  
3269 3274 else
3270 3275 println("Can't copy data from stream to temporary file ")
... ... @@ -3300,7 +3305,8 @@ define Server -&gt; ((RWStream) -&gt; One)
3300 3305 make_http_handler
3301 3306 (
3302 3307 List(Web_Site_Description) sites,
3303   - DenialOfService dos
  3308 + DenialOfService dos,
  3309 + (One) -> Bool shutdown_required
3304 3310 ) =
3305 3311 (Server server) |-> (RWStream conn) |->
3306 3312 if remote_IP_address_and_port(conn) is (addr,_) then
... ... @@ -3308,31 +3314,33 @@ define Server -&gt; ((RWStream) -&gt; One)
3308 3314 then print("Rejecting dubious IP address "+ip_addr_to_string(addr)+"\n")
3309 3315 else
3310 3316 with connection = buffered_connection(tcp(conn), var(constant_byte_array(0, 0)), var(0), var([])),
3311   - http_https_handler(sites, connection, false, dos, sstate(var(0),var(0))).
  3317 + http_https_handler(sites, connection, false, dos, sstate(var(0),var(0)), shutdown_required).
3312 3318 public define One
3313 3319 http_direct_handler
3314 3320 (
3315 3321 List(Web_Site_Description) sites,
3316 3322 RWStream conn,
3317   - DenialOfService dos
  3323 + DenialOfService dos,
  3324 + (One) -> Bool shutdown_required
3318 3325 ) =
3319 3326 if remote_IP_address_and_port(conn) is (addr,_) then
3320 3327 if is_dubious_IP(addr,dos)
3321 3328 then print("Rejecting dubious IP address "+ip_addr_to_string(addr)+"\n")
3322 3329 else
3323 3330 with connection = buffered_connection(tcp(conn), var(constant_byte_array(0, 0)), var(0), var([])),
3324   - http_https_handler(sites, connection, false, dos, sstate(var(0),var(0))).
  3331 + http_https_handler(sites, connection, false, dos, sstate(var(0),var(0)), shutdown_required).
3325 3332  
3326 3333  
3327 3334 define Server -> (SSL_Connection -> One)
3328 3335 make_https_handler
3329 3336 (
3330 3337 List(Web_Site_Description) sites,
3331   - DenialOfService dos
  3338 + DenialOfService dos,
  3339 + (One) -> Bool shutdown_required
3332 3340 ) =
3333 3341 (Server server) |-> (SSL_Connection conn) |->
3334 3342 with connection = buffered_connection(ssl(conn), var(constant_byte_array(0, 0)), var(0), var([])),
3335   - http_https_handler(sites, connection, true, dos, sstate(var(0),var(0))).
  3343 + http_https_handler(sites, connection, true, dos, sstate(var(0),var(0)), shutdown_required).
3336 3344  
3337 3345  
3338 3346  
... ... @@ -3614,11 +3622,12 @@ public define StartServerResult
3614 3622 Word32 ip_address,
3615 3623 Word32 port,
3616 3624 List(Web_Site_Description) sites,
3617   - DenialOfService dos
  3625 + DenialOfService dos,
  3626 + (One) -> Bool shutdown_required
3618 3627 ) =
3619 3628 create_directories(sites);
3620 3629 start_http_server(ip_address,port,
3621   - make_http_handler(sites, dos),
  3630 + make_http_handler(sites, dos, shutdown_required),
3622 3631 0,
3623 3632 dos).
3624 3633  
... ... @@ -3662,11 +3671,12 @@ public define StartServerResult
3662 3671 Word32 port,
3663 3672 String certificate_common_name, // of SSL server certificate
3664 3673 List(Web_Site_Description) sites,
3665   - DenialOfService dos
  3674 + DenialOfService dos,
  3675 + (One) -> Bool shutdown_required
3666 3676 ) =
3667 3677 create_directories(sites);
3668 3678 start_https_server(ip_address,port,certificate_common_name,
3669   - make_https_handler(sites, dos),
  3679 + make_https_handler(sites, dos, shutdown_required),
3670 3680 0,dos).
3671 3681  
3672 3682  
... ...