diff options
author | Péter Dimitrov <[email protected]> | 2019-03-08 13:29:30 +0100 |
---|---|---|
committer | Péter Dimitrov <[email protected]> | 2019-03-08 14:47:32 +0100 |
commit | bf48c2a3d49f06ecd670ba6b298f5910055aa5aa (patch) | |
tree | 4f3d8fbb66831c826a6b229df479bd71378eb0be /lib/inets/test | |
parent | 0ec68a93247ca0ea1d44a2465767dffa4450411a (diff) | |
download | otp-bf48c2a3d49f06ecd670ba6b298f5910055aa5aa.tar.gz otp-bf48c2a3d49f06ecd670ba6b298f5910055aa5aa.tar.bz2 otp-bf48c2a3d49f06ecd670ba6b298f5910055aa5aa.zip |
inets: Fix handling of erl_script_timeout
When httpd was started with 'erl_script_timeout', the value of the
option was converted to milliseconds before storage. Subsequent
calls to httpd:info/1 returned the input value multiplied by 1000.
This change fixes the handing of erl_script_timeout by storing the
timeout in seconds and converting it to milliseconds before usage.
Change-Id: Ic308d83b59ad0884e053f096f995754c89adcbf4
Diffstat (limited to 'lib/inets/test')
-rw-r--r-- | lib/inets/test/httpd_SUITE.erl | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/inets/test/httpd_SUITE.erl b/lib/inets/test/httpd_SUITE.erl index 5b6740fba3..fcb9ad7905 100644 --- a/lib/inets/test/httpd_SUITE.erl +++ b/lib/inets/test/httpd_SUITE.erl @@ -78,7 +78,8 @@ all() -> {group, http_rel_path_script_alias}, {group, http_not_sup}, {group, https_not_sup}, - mime_types_format + mime_types_format, + erl_script_timeout_option ]. groups() -> @@ -1777,6 +1778,18 @@ mime_types_format(Config) when is_list(Config) -> {"hqx","application/mac-binhex40"}]} = httpd_conf:load_mime_types(MimeTypes). +erl_script_timeout_option(Config) when is_list(Config) -> + inets:start(), + {ok, Pid} = inets:start(httpd, [{erl_script_timeout, 215}, + {server_name, "test"}, + {port,0}, + {server_root, "."}, + {document_root, "."}]), + Info = httpd:info(Pid), + 215 = proplists:get_value(erl_script_timeout, Info), + inets:stop(). + + %%-------------------------------------------------------------------- %% Internal functions ----------------------------------- %%-------------------------------------------------------------------- |