diff options
author | Erlang/OTP <[email protected]> | 2016-01-29 15:13:38 +0100 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2016-01-29 15:13:38 +0100 |
commit | 80e2ab864725f62ba0e4e8e6d1d14ac4272c9ab2 (patch) | |
tree | 60f2d2fa5efdb3a837a3102388c5462ab32f0ef0 /lib/inets/src/http_lib/http_uri.erl | |
parent | 7cf9a621c5280a3e97967c4c63ab6ca1adde69c3 (diff) | |
parent | a6a766143bd5332ff0173a9a3c05e3b36d20297c (diff) | |
download | otp-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/src/http_lib/http_uri.erl')
-rw-r--r-- | lib/inets/src/http_lib/http_uri.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/inets/src/http_lib/http_uri.erl b/lib/inets/src/http_lib/http_uri.erl index 6fe8c1776d..9940136f5a 100644 --- a/lib/inets/src/http_lib/http_uri.erl +++ b/lib/inets/src/http_lib/http_uri.erl @@ -196,10 +196,10 @@ parse_host_port(_Scheme, DefaultPort, HostPort, _Opts) -> {Host, int_port(Port)}. split_uri(UriPart, SplitChar, NoMatchResult, SkipLeft, SkipRight) -> - case inets_regexp:first_match(UriPart, SplitChar) of - {match, Match, _} -> - {string:substr(UriPart, 1, Match - SkipLeft), - string:substr(UriPart, Match + SkipRight, length(UriPart))}; + case re:run(UriPart, SplitChar, [{capture, first}]) of + {match, [{Match, _}]} -> + {string:substr(UriPart, 1, Match + 1 - SkipLeft), + string:substr(UriPart, Match + 1 + SkipRight, length(UriPart))}; nomatch -> NoMatchResult end. |