Skip to content

Commit 5f193af

Browse files
committed
allow lowercase env variable names
1 parent 848dfe6 commit 5f193af

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

rsconnect/http_support.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def _create_plain_connection(host_name, port, disable_tls_check, ca_data):
3737

3838

3939
def _get_proxy():
40-
proxyURL = os.getenv("HTTPS_PROXY")
40+
proxyURL = os.getenv("https_proxy", os.getenv("HTTPS_PROXY"))
4141
if not proxyURL:
4242
return None, None, None, None
4343
parsed = urlparse(proxyURL)
@@ -75,7 +75,9 @@ def _create_ssl_connection(host_name, port, disable_tls_check, ca_data):
7575
"""
7676
if ca_data is not None and disable_tls_check:
7777
raise ValueError("Cannot both disable TLS checking and provide a custom certificate")
78-
if any([host_name.endswith(host) for host in os.environ.get('NO_PROXY', '#').split(',')]):
78+
79+
no_proxy = os.environ.get("no_proxy", os.environ.get("NO_PROXY", "#"))
80+
if any([host_name.endswith(host) for host in no_proxy.split(",")]):
7981
proxyHost, proxyPort = None, None
8082
else:
8183
_, _, proxyHost, proxyPort = _get_proxy()

0 commit comments

Comments
 (0)