proxy: don't require the trailing slash on WinHTTP The path is not something that you use for proxies, so make use of the new optionality of the path when extracting URL parts.
diff --git a/appveyor.yml b/appveyor.yml
index 50152ad..4c58df6 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -40,9 +40,9 @@ test_script:
ctest -V -R libgit2_clar-cred_callback
Start-Job { java -jar $Env:APPVEYOR_BUILD_FOLDER\build\poxyproxy.jar -d --port 8080 --credentials foo:bar }
ctest -V .
- $env:GITTEST_REMOTE_PROXY_URL = "http://foo:bar@localhost:8080/"
+ $env:GITTEST_REMOTE_PROXY_URL = "http://foo:bar@localhost:8080"
.\Debug\libgit2_clar.exe -sonline::clone::proxy_credentials_in_url
- $env:GITTEST_REMOTE_PROXY_URL = "http://localhost:8080/"
+ $env:GITTEST_REMOTE_PROXY_URL = "http://localhost:8080"
$env:GITTEST_REMOTE_PROXY_USER = "foo"
$env:GITTEST_REMOTE_PROXY_PASS = "bar"
.\Debug\libgit2_clar.exe -sonline::clone::proxy_credentials_request
diff --git a/src/transports/winhttp.c b/src/transports/winhttp.c
index 22be39c..5a506d2 100644
--- a/src/transports/winhttp.c
+++ b/src/transports/winhttp.c
@@ -388,7 +388,8 @@ static int winhttp_stream_connect(winhttp_stream *s)
WINHTTP_PROXY_INFO proxy_info;
wchar_t *proxy_wide;
- if ((error = gitno_connection_data_from_url(&t->proxy_connection_data, proxy_url, NULL)) < 0)
+ if ((error = gitno_extract_url_parts(&t->proxy_connection_data.host, &t->proxy_connection_data.port, NULL,
+ &t->proxy_connection_data.user, &t->proxy_connection_data.pass, proxy_url, NULL)) < 0)
goto on_error;
if (t->proxy_connection_data.user && t->proxy_connection_data.pass) {