diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-05-20 23:48:25 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-05-20 23:49:41 +0300 |
commit | c69f2f8c869361e9e2bdb9fb3ceb2fe058013744 (patch) | |
tree | ecdeae936d072a0fdf97986b156e41aa297f36dc /http.c | |
parent | 88dd4282d949cdafff516650c1be8aaf4d67983f (diff) | |
parent | ecf7b129fa8619bfe16c5f7e470717ad79186e07 (diff) |
Merge branch 'cs/http-use-basic-after-failed-negotiate'
Regression fix for a change made during this cycle.
* cs/http-use-basic-after-failed-negotiate:
Revert "remote-curl: fall back to basic auth if Negotiate fails"
t5551: test http interaction with credential helpers
Diffstat (limited to 'http.c')
-rw-r--r-- | http.c | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -1650,18 +1650,17 @@ static int handle_curl_result(struct slot_results *results) } else if (missing_target(results)) return HTTP_MISSING_TARGET; else if (results->http_code == 401) { -#ifdef LIBCURL_CAN_HANDLE_AUTH_ANY - http_auth_methods &= ~CURLAUTH_GSSNEGOTIATE; - if (results->auth_avail) { - http_auth_methods &= results->auth_avail; - http_auth_methods_restricted = 1; - return HTTP_REAUTH; - } -#endif if (http_auth.username && http_auth.password) { credential_reject(&http_auth); return HTTP_NOAUTH; } else { +#ifdef LIBCURL_CAN_HANDLE_AUTH_ANY + http_auth_methods &= ~CURLAUTH_GSSNEGOTIATE; + if (results->auth_avail) { + http_auth_methods &= results->auth_avail; + http_auth_methods_restricted = 1; + } +#endif return HTTP_REAUTH; } } else { |