proxy: don't specify the protocol in the type · nodegit/libgit2@0d72f67 · GitHub
Skip to content

Commit 0d72f67

Browse files
committed
proxy: don't specify the protocol in the type
We leave this up to the scheme in the url field. The type should only tell us about whether we want a proxy and whether we want to auto-detect it.
1 parent db01724 commit 0d72f67

4 files changed

Lines changed: 9 additions & 14 deletions

File tree

‎include/git2/proxy.h‎

Lines changed: 5 additions & 10 deletions

‎src/transports/http.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ static int apply_proxy_config(http_subtransport *t)
575575
if ((error = git_remote__get_http_proxy(t->owner->owner, !!t->connection_data.use_ssl, &url)) < 0)
576576
return error;
577577

578-
opts.type = GIT_PROXY_HTTP;
578+
opts.type = GIT_PROXY_SPECIFIED;
579579
opts.url = url;
580580
error = git_stream_set_proxy(t->io, &opts);
581581
git__free(url);

‎src/transports/winhttp.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ static int winhttp_stream_connect(winhttp_stream *s)
381381
if (git_remote__get_http_proxy(t->owner->owner, !!t->connection_data.use_ssl, &proxy_url) < 0)
382382
goto on_error;
383383
}
384-
else if (proxy_opts->type == GIT_PROXY_HTTP) {
384+
else if (proxy_opts->type == GIT_PROXY_SPECIFIED) {
385385
proxy_url = git__strdup(proxy_opts->url);
386386
GITERR_CHECK_ALLOC(proxy_url);
387387
}

‎tests/online/clone.c‎

Lines changed: 2 additions & 2 deletions

0 commit comments

Comments
 (0)