diff options
author | Ingela Anderton Andin <[email protected]> | 2015-06-10 14:11:14 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2015-06-16 09:45:02 +0200 |
commit | 77d02ff81a4b7c0ea5f26b4e83097902556bef83 (patch) | |
tree | 05d90213f216662e9b2912568c93ee63d1f3b7da /lib/inets/src/http_server/mod_esi.erl | |
parent | d30b4ad1fac539b028fb8067caa6ff9c0cfbf004 (diff) | |
download | otp-77d02ff81a4b7c0ea5f26b4e83097902556bef83.tar.gz otp-77d02ff81a4b7c0ea5f26b4e83097902556bef83.tar.bz2 otp-77d02ff81a4b7c0ea5f26b4e83097902556bef83.zip |
inets: Remove use of httpd_conf:clean/1 and httpd_conf:custom_clean/3
Internal use of the function white_space_clean/1 could probably be done
in a much better way using re-module and removing a lot of legacy code.
But we will have to do this later, due to lack of time, we want to make
this commit as little work as possible.
Diffstat (limited to 'lib/inets/src/http_server/mod_esi.erl')
-rw-r--r-- | lib/inets/src/http_server/mod_esi.erl | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/inets/src/http_server/mod_esi.erl b/lib/inets/src/http_server/mod_esi.erl index b11df34f9e..d385afbd70 100644 --- a/lib/inets/src/http_server/mod_esi.erl +++ b/lib/inets/src/http_server/mod_esi.erl @@ -98,40 +98,40 @@ load("ErlScriptAlias " ++ ErlScriptAlias, []) -> case inets_regexp:split(ErlScriptAlias," ") of {ok, [ErlName | StrModules]} -> Modules = lists:map(fun(Str) -> - list_to_atom(httpd_conf:clean(Str)) + list_to_atom(string:strip(Str)) end, StrModules), {ok, [], {erl_script_alias, {ErlName, Modules}}}; {ok, _} -> - {error, ?NICE(httpd_conf:clean(ErlScriptAlias) ++ + {error, ?NICE(string:strip(ErlScriptAlias) ++ " is an invalid ErlScriptAlias")} end; load("EvalScriptAlias " ++ EvalScriptAlias, []) -> case inets_regexp:split(EvalScriptAlias, " ") of {ok, [EvalName | StrModules]} -> Modules = lists:map(fun(Str) -> - list_to_atom(httpd_conf:clean(Str)) + list_to_atom(string:strip(Str)) end, StrModules), {ok, [], {eval_script_alias, {EvalName, Modules}}}; {ok, _} -> - {error, ?NICE(httpd_conf:clean(EvalScriptAlias) ++ + {error, ?NICE(string:strip(EvalScriptAlias) ++ " is an invalid EvalScriptAlias")} end; load("ErlScriptTimeout " ++ Timeout, [])-> - case catch list_to_integer(httpd_conf:clean(Timeout)) of + case catch list_to_integer(string:strip(Timeout)) of TimeoutSec when is_integer(TimeoutSec) -> {ok, [], {erl_script_timeout, TimeoutSec * 1000}}; _ -> - {error, ?NICE(httpd_conf:clean(Timeout) ++ + {error, ?NICE(string:strip(Timeout) ++ " is an invalid ErlScriptTimeout")} end; load("ErlScriptNoCache " ++ CacheArg, [])-> - case catch list_to_atom(httpd_conf:clean(CacheArg)) of + case catch list_to_atom(string:strip(CacheArg)) of true -> {ok, [], {erl_script_nocache, true}}; false -> {ok, [], {erl_script_nocache, false}}; _ -> - {error, ?NICE(httpd_conf:clean(CacheArg)++ + {error, ?NICE(string:strip(CacheArg)++ " is an invalid ErlScriptNoCache directive")} end. |