aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src
diff options
context:
space:
mode:
authorJohannes Weißl <[email protected]>2013-07-18 22:09:51 +0200
committerIngela Anderton Andin <[email protected]>2014-02-05 10:32:27 +0100
commitd6577a26c9c2f2dd7bd26e585f3c9c22314ce1fb (patch)
treee375b0a302312935e617194d64254754a09d2a39 /lib/inets/src
parent56dcfd6610feea7a222c7373821ef7843905789b (diff)
downloadotp-d6577a26c9c2f2dd7bd26e585f3c9c22314ce1fb.tar.gz
otp-d6577a26c9c2f2dd7bd26e585f3c9c22314ce1fb.tar.bz2
otp-d6577a26c9c2f2dd7bd26e585f3c9c22314ce1fb.zip
Fix httpd config option 'script_timeout'
This fixes the usage of the httpd configuration option 'script_timeout', which got ignored before. The documentation states that the value is in seconds, which was true when using the Apache like configuration file, but not true when using the proplist style configuration.
Diffstat (limited to 'lib/inets/src')
-rw-r--r--lib/inets/src/http_server/mod_cgi.erl10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/inets/src/http_server/mod_cgi.erl b/lib/inets/src/http_server/mod_cgi.erl
index f1b73810e6..0b7c7489f7 100644
--- a/lib/inets/src/http_server/mod_cgi.erl
+++ b/lib/inets/src/http_server/mod_cgi.erl
@@ -131,9 +131,9 @@ store({script_nocache, Value} = Conf, _)
{ok, Conf};
store({script_nocache, Value}, _) ->
{error, {wrong_type, {script_nocache, Value}}};
-store({script_timeout, Value} = Conf, _)
+store({script_timeout, Value}, _)
when is_integer(Value), Value >= 0 ->
- {ok, Conf};
+ {ok, {script_timeout, Value * 1000}};
store({script_timeout, Value}, _) ->
{error, {wrong_type, {script_timeout, Value}}}.
@@ -238,7 +238,7 @@ send_request_body_to_script(ModData, Port) ->
end.
deliver_webpage(#mod{config_db = Db} = ModData, Port) ->
- Timeout = cgi_timeout(Db),
+ Timeout = script_timeout(Db),
case receive_headers(Port, httpd_cgi, parse_headers,
[<<>>, [], []], Timeout) of
{Headers, Body} ->
@@ -341,8 +341,8 @@ script_elements(#mod{method = "PUT", entity_body = Body}, _) ->
script_elements(_, _) ->
[].
-cgi_timeout(Db) ->
- httpd_util:lookup(Db, cgi_timeout, ?DEFAULT_CGI_TIMEOUT).
+script_timeout(Db) ->
+ httpd_util:lookup(Db, script_timeout, ?DEFAULT_CGI_TIMEOUT).
%% Convert error to printable string
%%