aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/test/httpd_time_test.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_time_test.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_time_test.erl')
-rw-r--r--lib/inets/test/httpd_time_test.erl22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/inets/test/httpd_time_test.erl b/lib/inets/test/httpd_time_test.erl
index 7c0acb5a99..1b4d74b28e 100644
--- a/lib/inets/test/httpd_time_test.erl
+++ b/lib/inets/test/httpd_time_test.erl
@@ -386,31 +386,31 @@ validate(ExpStatusCode, _SocketType, _Socket, Response) ->
%% Sz = sz(Response),
%% trash_the_rest(Socket, Sz),
%% inets_test_lib:close(SocketType, Socket),
- case inets_regexp:split(Response," ") of
- {ok, ["HTTP/1.0", ExpStatusCode|_]} ->
+ case re:split(Response," ", [{return, list}]) of
+ ["HTTP/1.0", ExpStatusCode|_] ->
ok;
- {ok, ["HTTP/1.0", StatusCode|_]} ->
+ ["HTTP/1.0", StatusCode|_] ->
error_msg("Unexpected status code: ~p (~s). "
"Expected status code: ~p (~s)",
[StatusCode, status_to_message(StatusCode),
ExpStatusCode, status_to_message(ExpStatusCode)]),
exit({unexpected_response_code, StatusCode, ExpStatusCode});
- {ok, ["HTTP/1.1", ExpStatusCode|_]} ->
+ ["HTTP/1.1", ExpStatusCode|_] ->
ok;
- {ok, ["HTTP/1.1", StatusCode|_]} ->
+ ["HTTP/1.1", StatusCode|_] ->
error_msg("Unexpected status code: ~p (~s). "
"Expected status code: ~p (~s)",
[StatusCode, status_to_message(StatusCode),
ExpStatusCode, status_to_message(ExpStatusCode)]),
exit({unexpected_response_code, StatusCode, ExpStatusCode});
- {ok, Unexpected} ->
- error_msg("Unexpected response split: ~p (~s)",
- [Unexpected, Response]),
- exit({unexpected_response, Unexpected, Response});
- {error, Reason} ->
+ {error, Reason} ->
error_msg("Failed processing response: ~p (~s)",
[Reason, Response]),
- exit({failed_response_processing, Reason, Response})
+ exit({failed_response_processing, Reason, Response});
+ Unexpected ->
+ error_msg("Unexpected response split: ~p (~s)",
+ [Unexpected, Response]),
+ exit({unexpected_response, Unexpected, Response})
end.