summaryrefslogtreecommitdiff
path: root/http.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-12-28 18:04:24 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-12-29 20:07:58 (GMT)
commit525ecd26c6cc8d1dc0c6190d8266e5d30b06da51 (patch)
treecf82d4fe7c2c831894c719d3ebd194a4573b720b /http.c
parent6c81a9908206799ccbc9a17bde17f1d766a8eef4 (diff)
downloadgit-525ecd26c6cc8d1dc0c6190d8266e5d30b06da51.zip
git-525ecd26c6cc8d1dc0c6190d8266e5d30b06da51.tar.gz
git-525ecd26c6cc8d1dc0c6190d8266e5d30b06da51.tar.bz2
Remove http.authAny
Back when the feature to use different HTTP authentication methods was originally written, it needed an extra HTTP request for everything when the feature was in effect, because we didn't reuse curl sessions. However, b8ac923 (Add an option for using any HTTP authentication scheme, not only basic, 2009-11-27) builds on top of an updated codebase that does reuse curl sessions; there is no need to manually avoid the extra overhead by making this configurable anymore. Acked-by: Martin Storsjo <martin@martin.st> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http.c')
-rw-r--r--http.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/http.c b/http.c
index aeb69b3..01e0fdc 100644
--- a/http.c
+++ b/http.c
@@ -40,9 +40,6 @@ static long curl_low_speed_time = -1;
static int curl_ftp_no_epsv;
static const char *curl_http_proxy;
static char *user_name, *user_pass;
-#ifdef LIBCURL_CAN_HANDLE_AUTH_ANY
-static int curl_http_auth_any = 0;
-#endif
#if LIBCURL_VERSION_NUM >= 0x071700
/* Use CURLOPT_KEYPASSWD as is */
@@ -197,12 +194,6 @@ static int http_options(const char *var, const char *value, void *cb)
http_post_buffer = LARGE_PACKET_MAX;
return 0;
}
-#ifdef LIBCURL_CAN_HANDLE_AUTH_ANY
- if (!strcmp("http.authany", var)) {
- curl_http_auth_any = git_config_bool(var, value);
- return 0;
- }
-#endif
/* Fall back on the default ones */
return git_default_config(var, value, cb);
@@ -254,8 +245,7 @@ static CURL *get_curl_handle(void)
curl_easy_setopt(result, CURLOPT_NETRC, CURL_NETRC_OPTIONAL);
#endif
#ifdef LIBCURL_CAN_HANDLE_AUTH_ANY
- if (curl_http_auth_any)
- curl_easy_setopt(result, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
+ curl_easy_setopt(result, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
#endif
init_curl_http_auth(result);
@@ -408,11 +398,6 @@ void http_init(struct remote *remote)
if (getenv("GIT_CURL_FTP_NO_EPSV"))
curl_ftp_no_epsv = 1;
-#ifdef LIBCURL_CAN_HANDLE_AUTH_ANY
- if (getenv("GIT_HTTP_AUTH_ANY"))
- curl_http_auth_any = 1;
-#endif
-
if (remote && remote->url && remote->url[0]) {
http_auth_init(remote->url[0]);
if (!ssl_cert_password_required &&