From c030104256344756420d819b1b1381777c216a38 Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Mon, 9 Oct 2017 15:56:05 +0200 Subject: inets: ENV should be a string This is tested by new erts check that will cause badarg when trying to execute scripts via mod_cgi --- lib/inets/src/http_server/httpd_script_env.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/inets/src/http_server/httpd_script_env.erl b/lib/inets/src/http_server/httpd_script_env.erl index 055f08fdb0..d7c92c59ef 100644 --- a/lib/inets/src/http_server/httpd_script_env.erl +++ b/lib/inets/src/http_server/httpd_script_env.erl @@ -166,9 +166,9 @@ create_script_elements(cgi, path_info, PathInfo, ModData) -> [{"PATH_INFO", PathInfo}, {"PATH_TRANSLATED", PathTranslated}]; create_script_elements(esi, entity_body, Body, _) -> - [{content_length, httpd_util:flatlength(Body)}]; + [{content_length, integer_to_list(httpd_util:flatlength(Body))}]; create_script_elements(cgi, entity_body, Body, _) -> - [{"CONTENT_LENGTH", httpd_util:flatlength(Body)}]; + [{"CONTENT_LENGTH", integer_to_list(httpd_util:flatlength(Body))}]; create_script_elements(_, _, _, _) -> []. -- cgit v1.2.3 From 07a918f5342fe4f0f9cd97dad0db274cd144e04b Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Tue, 10 Oct 2017 18:35:09 +0200 Subject: inets: httpc - fix default timeout in httpc_SUITE Timeout must be set in suite/0 or init_per_testcase not init_per_group or init_per_suite --- lib/inets/test/httpc_SUITE.erl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/inets/test/httpc_SUITE.erl b/lib/inets/test/httpc_SUITE.erl index e6dcd2285f..5dfb1474e5 100644 --- a/lib/inets/test/httpc_SUITE.erl +++ b/lib/inets/test/httpc_SUITE.erl @@ -42,7 +42,8 @@ %% Common Test interface functions ----------------------------------- %%-------------------------------------------------------------------- suite() -> - [{ct_hooks,[ts_install_cth]} + [{ct_hooks,[ts_install_cth]}, + {timetrap,{seconds, 30}} ]. all() -> @@ -142,7 +143,6 @@ misc() -> %%-------------------------------------------------------------------- init_per_suite(Config) -> - ct:timetrap({seconds, 30}), PrivDir = proplists:get_value(priv_dir, Config), DataDir = proplists:get_value(data_dir, Config), inets_test_lib:start_apps([inets]), @@ -169,7 +169,6 @@ init_per_group(Group, Config0) when Group =:= sim_https; Group =:= https-> catch crypto:stop(), try crypto:start() of ok -> - ct:timetrap({seconds, 30}), start_apps(Group), do_init_per_group(Group, Config0) catch -- cgit v1.2.3