Commit bfdba8ee by Edward Thomson

Merge branch 'sathieu/patch-1' into main

parents d60872f6 8e762124
...@@ -152,6 +152,11 @@ void test_remote_httpproxy__env(void) ...@@ -152,6 +152,11 @@ void test_remote_httpproxy__env(void)
orig_no_proxy = cl_getenv("NO_PROXY"); orig_no_proxy = cl_getenv("NO_PROXY");
orig_proxies_need_reset = 1; orig_proxies_need_reset = 1;
/* Clear everything for a fresh start */
cl_setenv("HTTP_PROXY", NULL);
cl_setenv("HTTPS_PROXY", NULL);
cl_setenv("NO_PROXY", NULL);
/* HTTP proxy is ignored for HTTPS */ /* HTTP proxy is ignored for HTTPS */
cl_setenv("HTTP_PROXY", "http://localhost:9/"); cl_setenv("HTTP_PROXY", "http://localhost:9/");
assert_proxy_is(NULL); assert_proxy_is(NULL);
...@@ -173,7 +178,11 @@ void test_remote_httpproxy__env(void) ...@@ -173,7 +178,11 @@ void test_remote_httpproxy__env(void)
cl_setenv("NO_PROXY", "github.dev,github.com,github.foo"); cl_setenv("NO_PROXY", "github.dev,github.com,github.foo");
assert_proxy_is(NULL); assert_proxy_is(NULL);
cl_setenv("HTTPS_PROXY", "");
assert_proxy_is(NULL);
/* configuration overrides environment variables */ /* configuration overrides environment variables */
cl_setenv("HTTPS_PROXY", "http://localhost:10/");
cl_setenv("NO_PROXY", "github.none"); cl_setenv("NO_PROXY", "github.none");
assert_config_match("http.https://github.com.proxy", "http://localhost:11/"); assert_config_match("http.https://github.com.proxy", "http://localhost:11/");
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment