Merge branch 'cs/http-use-basic-after-failed-negotiate' · deviantintegral/git@c69f2f8 · GitHub
Skip to content

Commit c69f2f8

Browse files
committed
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
2 parents 88dd428 + ecf7b12 commit c69f2f8

3 files changed

Lines changed: 48 additions & 13 deletions

File tree

Documentation/RelNotes/2.32.0.txt

Lines changed: 0 additions & 5 deletions

http.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1650,18 +1650,17 @@ static int handle_curl_result(struct slot_results *results)
16501650
} else if (missing_target(results))
16511651
return HTTP_MISSING_TARGET;
16521652
else if (results->http_code == 401) {
1653-
#ifdef LIBCURL_CAN_HANDLE_AUTH_ANY
1654-
http_auth_methods &= ~CURLAUTH_GSSNEGOTIATE;
1655-
if (results->auth_avail) {
1656-
http_auth_methods &= results->auth_avail;
1657-
http_auth_methods_restricted = 1;
1658-
return HTTP_REAUTH;
1659-
}
1660-
#endif
16611653
if (http_auth.username && http_auth.password) {
16621654
credential_reject(&http_auth);
16631655
return HTTP_NOAUTH;
16641656
} else {
1657+
#ifdef LIBCURL_CAN_HANDLE_AUTH_ANY
1658+
http_auth_methods &= ~CURLAUTH_GSSNEGOTIATE;
1659+
if (results->auth_avail) {
1660+
http_auth_methods &= results->auth_avail;
1661+
http_auth_methods_restricted = 1;
1662+
}
1663+
#endif
16651664
return HTTP_REAUTH;
16661665
}
16671666
} else {

t/t5551-http-fetch-smart.sh

Lines changed: 41 additions & 0 deletions

0 commit comments

Comments
 (0)