aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/http_server/httpd_conf.erl
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2012-11-06 16:42:09 +0100
committerFredrik Gustafsson <[email protected]>2012-11-06 16:42:09 +0100
commit40d2dd2e50cf245ae88e0a10b3d2f50386264ca5 (patch)
treee28bfd11ad741b82c52827a7763d310771fba005 /lib/inets/src/http_server/httpd_conf.erl
parent6291667b75dc66f57b1e00fed9aac356538b9ed9 (diff)
downloadotp-40d2dd2e50cf245ae88e0a10b3d2f50386264ca5.tar.gz
otp-40d2dd2e50cf245ae88e0a10b3d2f50386264ca5.tar.bz2
otp-40d2dd2e50cf245ae88e0a10b3d2f50386264ca5.zip
Changed property to minimum_bytes_per_second and checking if is integer on start
Diffstat (limited to 'lib/inets/src/http_server/httpd_conf.erl')
-rw-r--r--lib/inets/src/http_server/httpd_conf.erl15
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/inets/src/http_server/httpd_conf.erl b/lib/inets/src/http_server/httpd_conf.erl
index b575d7331b..884e3defb8 100644
--- a/lib/inets/src/http_server/httpd_conf.erl
+++ b/lib/inets/src/http_server/httpd_conf.erl
@@ -483,7 +483,7 @@ validate_properties(Properties) ->
case mandatory_properties(Properties) of
ok ->
%% Second, check that property dependency are ok
- {ok, validate_properties2(Properties)};
+ {ok, check_minimum_bytes_per_second(validate_properties2(Properties))};
Error ->
throw(Error)
end.
@@ -522,7 +522,18 @@ validate_properties2(Properties) ->
throw(Error)
end
end.
-
+check_minimum_bytes_per_second(Properties) ->
+ case proplists:get_value(minimum_bytes_per_second, Properties, false) of
+ false ->
+ Properties;
+ Nr ->
+ case is_integer(Nr) of
+ false ->
+ throw({error, {minimum_bytes_per_second, is_not_integer}});
+ _ ->
+ Properties
+ end
+ end.
mandatory_properties(ConfigList) ->
a_must(ConfigList, [server_name, port, server_root, document_root]).