|
|
@ -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 |
|
|
|