From ef976395e26a25fb6d048d859a1c8cddb2640b9a Mon Sep 17 00:00:00 2001 From: Knut Franke Date: Tue, 26 Jan 2016 13:02:47 +0000 Subject: http: allow selection of proxy authentication method CURLAUTH_ANY does not work with proxies which answer unauthenticated requests with a 307 redirect to an error page instead of a 407 listing supported authentication methods. Therefore, allow the authentication method to be set using the environment variable GIT_HTTP_PROXY_AUTHMETHOD or configuration variables http.proxyAuthmethod and remote..proxyAuthmethod (in analogy to http.proxy and remote..proxy). The following values are supported: * anyauth (default) * basic * digest * negotiate * ntlm Signed-off-by: Knut Franke Signed-off-by: Elia Pinto Helped-by: Junio C Hamano Helped-by: Eric Sunshine Helped-by: Elia Pinto Signed-off-by: Junio C Hamano --- remote.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'remote.c') diff --git a/remote.c b/remote.c index 9d34b5a5d..0bb5a6983 100644 --- a/remote.c +++ b/remote.c @@ -428,6 +428,9 @@ static int handle_config(const char *key, const char *value, void *cb) } else if (!strcmp(subkey, ".proxy")) { return git_config_string((const char **)&remote->http_proxy, key, value); + } else if (!strcmp(subkey, ".proxyauthmethod")) { + return git_config_string((const char **)&remote->http_proxy_authmethod, + key, value); } else if (!strcmp(subkey, ".vcs")) { return git_config_string(&remote->foreign_vcs, key, value); } -- cgit v1.2.1