File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -354,7 +354,14 @@ namespace vcpkg
354
354
auto maybe_https_proxy_env = get_environment_variable (EnvironmentVariableHttpsProxy);
355
355
if (auto p_https_proxy = maybe_https_proxy_env.get ())
356
356
{
357
- std::wstring env_proxy_settings = Strings::to_utf16 (*p_https_proxy);
357
+ StringView p_https_proxy_view = *p_https_proxy;
358
+ if (p_https_proxy_view.size () != 0 && p_https_proxy_view.back () == ' /' )
359
+ {
360
+ // remove trailing slash
361
+ p_https_proxy_view = p_https_proxy_view.substr (0 , p_https_proxy_view.size () - 1 );
362
+ }
363
+
364
+ std::wstring env_proxy_settings = Strings::to_utf16 (p_https_proxy_view);
358
365
WINHTTP_PROXY_INFO proxy;
359
366
proxy.dwAccessType = WINHTTP_ACCESS_TYPE_NAMED_PROXY;
360
367
proxy.lpszProxy = env_proxy_settings.data ();
You can’t perform that action at this time.
0 commit comments