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>
Junio C Hamano committed
Dec 28, 2009 at 10:04 UTC
525ecd26c6cc8d1dc0c6190d8266e5d30b06da51
2 files changed
+1
-23
Documentation/config.txt
-7
@@ -1158,13 +1158,6 @@ http.noEPSV::
1158
support EPSV mode. Can be overridden by the 'GIT_CURL_FTP_NO_EPSV'
1159
environment variable. Default is false (curl will use EPSV).
1160
1161
-http.authAny::
1162
- Allow any HTTP authentication method, not only basic. Enabling
1163
- this lowers the performance slightly, by having to do requests
1164
- without any authentication to discover the authentication method
1165
- to use. Can be overridden by the 'GIT_HTTP_AUTH_ANY'
1166
- environment variable. Default is false.
1167
-
1161
i18n.commitEncoding::
1162
Character encoding the commit messages are stored in; git itself
1163
does not care per se, but this information is necessary e.g. when
http.c
+1
-16
@@ -40,9 +40,6 @@ static long curl_low_speed_time = -1;
40
static int curl_ftp_no_epsv;
41
static const char *curl_http_proxy;
42
static char *user_name, *user_pass;
43
-#ifdef LIBCURL_CAN_HANDLE_AUTH_ANY
44
-static int curl_http_auth_any = 0;
45
-#endif
43
44
#if LIBCURL_VERSION_NUM >= 0x071700
45
/* Use CURLOPT_KEYPASSWD as is */
@@ -197,12 +194,6 @@ static int http_options(const char *var, const char *value, void *cb)
194
http_post_buffer = LARGE_PACKET_MAX;
195
return 0;
196
}
200
-#ifdef LIBCURL_CAN_HANDLE_AUTH_ANY
201
- if (!strcmp("http.authany", var)) {
202
- curl_http_auth_any = git_config_bool(var, value);
203
- return 0;
204
- }
205
-#endif
197
198
/* Fall back on the default ones */
199
return git_default_config(var, value, cb);
@@ -254,8 +245,7 @@ static CURL *get_curl_handle(void)
245
curl_easy_setopt(result, CURLOPT_NETRC, CURL_NETRC_OPTIONAL);
246
#endif
247
#ifdef LIBCURL_CAN_HANDLE_AUTH_ANY
257
- if (curl_http_auth_any)
258
- curl_easy_setopt(result, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
248
+ curl_easy_setopt(result, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
249
#endif
250
251
init_curl_http_auth(result);
@@ -408,11 +398,6 @@ void http_init(struct remote *remote)
398
if (getenv("GIT_CURL_FTP_NO_EPSV"))
399
curl_ftp_no_epsv = 1;
400
411
-#ifdef LIBCURL_CAN_HANDLE_AUTH_ANY
412
- if (getenv("GIT_HTTP_AUTH_ANY"))
413
- curl_http_auth_any = 1;
414
-#endif
415
-
401
if (remote && remote->url && remote->url[0]) {
402
http_auth_init(remote->url[0]);
403
if (!ssl_cert_password_required &&