summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2016-03-14 17:36:04 +0100
committerCarlos Martín Nieto <cmn@dwim.me>2016-04-19 13:54:19 +0200
commit0d72f67f28d52b3d7fb2760484fb51c014273bb2 (patch)
tree17e9de02338e01e47a1f9af84b62985991d0dacd /src
parentdb01724fd969a7d01711e1b8e6f8d763873c9245 (diff)
downloadlibgit2-0d72f67f28d52b3d7fb2760484fb51c014273bb2.tar.gz
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.
Diffstat (limited to 'src')
-rw-r--r--src/transports/http.c2
-rw-r--r--src/transports/winhttp.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/transports/http.c b/src/transports/http.c
index 03a16da98..7bb3374a0 100644
--- a/src/transports/http.c
+++ b/src/transports/http.c
@@ -575,7 +575,7 @@ static int apply_proxy_config(http_subtransport *t)
if ((error = git_remote__get_http_proxy(t->owner->owner, !!t->connection_data.use_ssl, &url)) < 0)
return error;
- opts.type = GIT_PROXY_HTTP;
+ opts.type = GIT_PROXY_SPECIFIED;
opts.url = url;
error = git_stream_set_proxy(t->io, &opts);
git__free(url);
diff --git a/src/transports/winhttp.c b/src/transports/winhttp.c
index d9f38c826..580c3b91b 100644
--- a/src/transports/winhttp.c
+++ b/src/transports/winhttp.c
@@ -381,7 +381,7 @@ static int winhttp_stream_connect(winhttp_stream *s)
if (git_remote__get_http_proxy(t->owner->owner, !!t->connection_data.use_ssl, &proxy_url) < 0)
goto on_error;
}
- else if (proxy_opts->type == GIT_PROXY_HTTP) {
+ else if (proxy_opts->type == GIT_PROXY_SPECIFIED) {
proxy_url = git__strdup(proxy_opts->url);
GITERR_CHECK_ALLOC(proxy_url);
}