Repository navigation
Conversation
httpc ignores the userinfo in a proxy URL, so a proxy that requires authentication rejected the CONNECT with 407 and the precompiled download fell back to a source build. Pass the credentials as proxy_auth, taken from the proxy for the URL's scheme, as Mix.Utils.proxy_config/1 does. Closes elixir-lang#99
The "Using HTTP(S)_PROXY" messages printed the proxy URL as given, password included, into build logs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #99.
ElixirMake.Downloader.Httpcdropped the credentials in the proxy URL, so a proxy that requires authentication answered the CONNECT with 407 and the precompiled download fell back to a source build. This passes them as httpc'sproxy_auth, taken from the proxy for the URL's scheme, followingMix.Utils.proxy_config/1. As in Mix, a missing password becomes""and the credentials aren't percent-decoded.The second commit stops the
Using HTTP(S)_PROXYmessages from printing the password. It's separate in case you'd rather leave it out.How I validated it:
HTTPS_PROXY, the CONNECT now sendsProxy-Authorization: Basic …, where before it sent none. Without credentials there's no header, a username without a password sendsuser:, and anhttp://URL usesHTTP_PROXY's credentials rather thanHTTPS_PROXY's.checksum.exs.mix format --check-formatted,mix compile --warnings-as-errorsandmix testpass on Elixir 1.19.1 / OTP 28.I didn't add a test, since the last downloader test was removed in 1b1a9a9. Happy to add one if you'd like.