Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix proxy parsing when HTTP_PROXY doesn't have a scheme (#541) #542

Merged
merged 1 commit into from
Mar 30, 2021

Conversation

cheister
Copy link
Collaborator

Fix for HTTP_PROXY parsing when url doesn't have a scheme #541

if ":" in netloc:
return netloc.split(":")[0]
else:
return netloc

def _get_proxy_port(url):
netloc = url.split("://", 1)[1].split("/")[0].split("@")[-1]
no_scheme_url = url.split("://", 1)[1] if "://" in url else url
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: extract this line into a function?

@cheister cheister force-pushed the fix-no-scheme-proxy-parsing branch from 31114ef to ff29024 Compare March 30, 2021 16:49
@cheister cheister merged commit c0a8a3e into bazelbuild:master Mar 30, 2021
@cheister cheister deleted the fix-no-scheme-proxy-parsing branch March 30, 2021 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants