aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/http_server/mod_auth_plain.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2016-01-28 15:44:15 +0100
committerIngela Anderton Andin <[email protected]>2016-01-28 16:13:58 +0100
commitba8d87765f490d99c9768dd116bb1a2e75354cc6 (patch)
tree90e4628f32237d9529b997b0380c1bea1c2775d8 /lib/inets/src/http_server/mod_auth_plain.erl
parent1523be48ab4071b158412f4b06fe9c8d6ba3e73c (diff)
downloadotp-ba8d87765f490d99c9768dd116bb1a2e75354cc6.tar.gz
otp-ba8d87765f490d99c9768dd116bb1a2e75354cc6.tar.bz2
otp-ba8d87765f490d99c9768dd116bb1a2e75354cc6.zip
inets: Use re instead of inets_regexp
Diffstat (limited to 'lib/inets/src/http_server/mod_auth_plain.erl')
-rw-r--r--lib/inets/src/http_server/mod_auth_plain.erl14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/inets/src/http_server/mod_auth_plain.erl b/lib/inets/src/http_server/mod_auth_plain.erl
index e85d3b8776..1a3120e03c 100644
--- a/lib/inets/src/http_server/mod_auth_plain.erl
+++ b/lib/inets/src/http_server/mod_auth_plain.erl
@@ -244,11 +244,11 @@ parse_group(Stream, GroupList, "") ->
parse_group(Stream, GroupList, [$#|_]) ->
parse_group(Stream, GroupList);
parse_group(Stream, GroupList, Line) ->
- case inets_regexp:split(Line, ":") of
- {ok, [Group,Users]} ->
- {ok, UserList} = inets_regexp:split(Users," "),
+ case re:split(Line, ":", [{return, list}]) of
+ [Group,Users] ->
+ UserList = re:split(Users," ", [{return, list}]),
parse_group(Stream, [{Group,UserList}|GroupList]);
- {ok, _} ->
+ _ ->
{error, ?NICE(Line)}
end.
@@ -278,10 +278,10 @@ parse_passwd(Stream, PasswdList, "") ->
parse_passwd(Stream, PasswdList, [$#|_]) ->
parse_passwd(Stream, PasswdList);
parse_passwd(Stream, PasswdList, Line) ->
- case inets_regexp:split(Line,":") of
- {ok, [User,Password]} ->
+ case re:split(Line,":", [{return, list}]) of
+ [User,Password] ->
parse_passwd(Stream, [{User,Password, []}|PasswdList]);
- {ok,_} ->
+ _ ->
{error, ?NICE(Line)}
end.