Skip to content

Commit 525ecd2

Browse files
committed
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 <[email protected]> Acked-by: Shawn O. Pearce <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6c81a99 commit 525ecd2

File tree

2 files changed

+1
-23
lines changed

2 files changed

+1
-23
lines changed

Documentation/config.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,13 +1158,6 @@ http.noEPSV::
11581158
support EPSV mode. Can be overridden by the 'GIT_CURL_FTP_NO_EPSV'
11591159
environment variable. Default is false (curl will use EPSV).
11601160

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-
11681161
i18n.commitEncoding::
11691162
Character encoding the commit messages are stored in; git itself
11701163
does not care per se, but this information is necessary e.g. when

http.c

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ static long curl_low_speed_time = -1;
4040
static int curl_ftp_no_epsv;
4141
static const char *curl_http_proxy;
4242
static char *user_name, *user_pass;
43-
#ifdef LIBCURL_CAN_HANDLE_AUTH_ANY
44-
static int curl_http_auth_any = 0;
45-
#endif
4643

4744
#if LIBCURL_VERSION_NUM >= 0x071700
4845
/* Use CURLOPT_KEYPASSWD as is */
@@ -197,12 +194,6 @@ static int http_options(const char *var, const char *value, void *cb)
197194
http_post_buffer = LARGE_PACKET_MAX;
198195
return 0;
199196
}
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
206197

207198
/* Fall back on the default ones */
208199
return git_default_config(var, value, cb);
@@ -254,8 +245,7 @@ static CURL *get_curl_handle(void)
254245
curl_easy_setopt(result, CURLOPT_NETRC, CURL_NETRC_OPTIONAL);
255246
#endif
256247
#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);
259249
#endif
260250

261251
init_curl_http_auth(result);
@@ -408,11 +398,6 @@ void http_init(struct remote *remote)
408398
if (getenv("GIT_CURL_FTP_NO_EPSV"))
409399
curl_ftp_no_epsv = 1;
410400

411-
#ifdef LIBCURL_CAN_HANDLE_AUTH_ANY
412-
if (getenv("GIT_HTTP_AUTH_ANY"))
413-
curl_http_auth_any = 1;
414-
#endif
415-
416401
if (remote && remote->url && remote->url[0]) {
417402
http_auth_init(remote->url[0]);
418403
if (!ssl_cert_password_required &&

0 commit comments

Comments
 (0)