aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/test/httpd_test_lib.erl
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2016-01-29 15:13:38 +0100
committerErlang/OTP <[email protected]>2016-01-29 15:13:38 +0100
commit80e2ab864725f62ba0e4e8e6d1d14ac4272c9ab2 (patch)
tree60f2d2fa5efdb3a837a3102388c5462ab32f0ef0 /lib/inets/test/httpd_test_lib.erl
parent7cf9a621c5280a3e97967c4c63ab6ca1adde69c3 (diff)
parenta6a766143bd5332ff0173a9a3c05e3b36d20297c (diff)
downloadotp-80e2ab864725f62ba0e4e8e6d1d14ac4272c9ab2.tar.gz
otp-80e2ab864725f62ba0e4e8e6d1d14ac4272c9ab2.tar.bz2
otp-80e2ab864725f62ba0e4e8e6d1d14ac4272c9ab2.zip
Merge branch 'ia/maint/inets/mod_alias/OTP-13248' into maint-18
* ia/maint/inets/mod_alias/OTP-13248: inets: Prepare for release inets: Traverse all aliases looking for the longest match inets: Use re instead of inets_regexp # Conflicts: # lib/inets/vsn.mk
Diffstat (limited to 'lib/inets/test/httpd_test_lib.erl')
-rw-r--r--lib/inets/test/httpd_test_lib.erl10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/inets/test/httpd_test_lib.erl b/lib/inets/test/httpd_test_lib.erl
index c58966ce10..71e201f826 100644
--- a/lib/inets/test/httpd_test_lib.erl
+++ b/lib/inets/test/httpd_test_lib.erl
@@ -96,10 +96,10 @@ verify_request(SocketType, Host, Port, TranspOpts, Node, RequestStr, Options, Ti
try inets_test_lib:connect_bin(SocketType, Host, Port, TranspOpts) of
{ok, Socket} ->
ok = inets_test_lib:send(SocketType, Socket, RequestStr),
- State = case inets_regexp:match(RequestStr, "printenv") of
+ State = case re:run(RequestStr, "printenv", [{capture, none}]) of
nomatch ->
#state{};
- _ ->
+ match ->
#state{print = true}
end,
@@ -317,10 +317,10 @@ do_validate(Header, [_Unknown | Rest], N, P) ->
do_validate(Header, Rest, N, P).
is_expect(RequestStr) ->
- case inets_regexp:match(RequestStr, "xpect:100-continue") of
- {match, _, _}->
+ case re:run(RequestStr, "xpect:100-continue", [{capture, none}]) of
+ match->
true;
- _ ->
+ nomatch ->
false
end.