Skip to content

Commit

Permalink
Merge pull request #1655 from kanyukaaa/master
Browse files Browse the repository at this point in the history
fixed handling of proxy username and password when fetching registry
  • Loading branch information
ferd authored Nov 5, 2017
2 parents 557623b + cc660d7 commit 387b89a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/rebar_prv_update.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [{relaxed, true} | 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),
Expand Down

0 comments on commit 387b89a

Please sign in to comment.