diff options
author | Zandra <[email protected]> | 2016-01-29 17:43:37 +0100 |
---|---|---|
committer | Zandra <[email protected]> | 2016-01-29 17:43:37 +0100 |
commit | 57a928b4bc1076b169ecc95e38ab23cf79e03280 (patch) | |
tree | b6edbc2d2238d742772239f7dd64556067071b2f /lib/inets/src/http_lib | |
parent | 3eb54b2053f76d3d47eed8774153be0f7a5016c3 (diff) | |
parent | d96471b3f404f7341279d8598dd74d92fb1a923c (diff) | |
download | otp-57a928b4bc1076b169ecc95e38ab23cf79e03280.tar.gz otp-57a928b4bc1076b169ecc95e38ab23cf79e03280.tar.bz2 otp-57a928b4bc1076b169ecc95e38ab23cf79e03280.zip |
Merge branch 'maint-18' into maint
Diffstat (limited to 'lib/inets/src/http_lib')
-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. |