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
354354 auto maybe_https_proxy_env = get_environment_variable (EnvironmentVariableHttpsProxy);
355355 if (auto p_https_proxy = maybe_https_proxy_env.get ())
356356 {
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);
358365 WINHTTP_PROXY_INFO proxy;
359366 proxy.dwAccessType = WINHTTP_ACCESS_TYPE_NAMED_PROXY;
360367 proxy.lpszProxy = env_proxy_settings.data ();
You can’t perform that action at this time.
0 commit comments