From bf1597ba280155f1004b5a2bfd7c553d8d102860 Mon Sep 17 00:00:00 2001 From: Andrey Kanyuka Date: Fri, 3 Nov 2017 14:02:16 +0200 Subject: fixed handling of proxy username and password when fetching registry --- src/rebar_prv_update.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/rebar_prv_update.erl') diff --git a/src/rebar_prv_update.erl b/src/rebar_prv_update.erl index a019c5a..9d632d4 100644 --- a/src/rebar_prv_update.erl +++ b/src/rebar_prv_update.erl @@ -51,9 +51,10 @@ do(State) -> CDN = rebar_state:get(State, rebar_packages_cdn, ?DEFAULT_CDN), case rebar_utils:url_append_path(CDN, ?REMOTE_REGISTRY_FILE) of {ok, Url} -> + HttpOptions = rebar_utils:get_proxy_auth(), ?DEBUG("Fetching registry from ~p", [Url]), case httpc:request(get, {Url, [{"User-Agent", rebar_utils:user_agent()}]}, - [], [{stream, TmpFile}, {sync, true}], + HttpOptions, [{stream, TmpFile}, {sync, true}], rebar) of {ok, saved_to_file} -> {ok, Data} = file:read_file(TmpFile), -- cgit v1.1 From cc660d717a7c4fd5d290eddf9c1b1d9772a8924e Mon Sep 17 00:00:00 2001 From: Andrey Kanyuka Date: Sun, 5 Nov 2017 18:27:10 +0200 Subject: added http option {relaxed, true} when fetching registry --- src/rebar_prv_update.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/rebar_prv_update.erl') diff --git a/src/rebar_prv_update.erl b/src/rebar_prv_update.erl index 9d632d4..79804d3 100644 --- a/src/rebar_prv_update.erl +++ b/src/rebar_prv_update.erl @@ -51,7 +51,7 @@ do(State) -> CDN = rebar_state:get(State, rebar_packages_cdn, ?DEFAULT_CDN), case rebar_utils:url_append_path(CDN, ?REMOTE_REGISTRY_FILE) of {ok, Url} -> - HttpOptions = rebar_utils:get_proxy_auth(), + HttpOptions = [{relaxed, true} | rebar_utils:get_proxy_auth()], ?DEBUG("Fetching registry from ~p", [Url]), case httpc:request(get, {Url, [{"User-Agent", rebar_utils:user_agent()}]}, HttpOptions, [{stream, TmpFile}, {sync, true}], -- cgit v1.1