瀏覽代碼

Erlang/OTP 25 compatibility for ./bootstrap

Replaces (deprecated in OTP 25) http_uri calls with uri_string.
pull/2452/head
Michael Klishin 4 年之前
父節點
當前提交
cdc35ea7ac
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: E80EDCFA0CDB21EE
共有 1 個檔案被更改,包括 2 行新增2 行删除
  1. +2
    -2
      bootstrap

+ 2
- 2
bootstrap 查看文件

@ -156,7 +156,7 @@ set_httpc_options(_, []) ->
ok;
set_httpc_options(Scheme, Proxy) ->
{ok, {_, UserInfo, Host, Port, _, _}} = http_uri:parse(Proxy),
#{userinfo := UserInfo, host := Host, port := Port} = uri_string:parse(Proxy),
httpc:set_options([{Scheme, {{Host, Port}, []}}], rebar),
proxy_ipfamily(Host, inet:gethostbyname(Host)),
set_proxy_auth(UserInfo).
@ -721,7 +721,7 @@ set_proxy_auth(UserInfo) ->
[Username, Password] = re:split(UserInfo, ":",
[{return, list}, {parts,2}, unicode]),
%% password may contain url encoded characters, need to decode them first
put(proxy_auth, [{proxy_auth, {Username, http_uri:decode(Password)}}]).
put(proxy_auth, [{proxy_auth, {Username, uri_string:percent_decode(Password)}}]).
get_proxy_auth() ->
case get(proxy_auth) of

Loading…
取消
儲存