Merge pull request #4839 from palmin/ignore-unsupported-http-auth ignore unsupported http authentication contexts
diff --git a/src/transports/http.c b/src/transports/http.c
index bc3ab18..df0d342 100644
--- a/src/transports/http.c
+++ b/src/transports/http.c
@@ -142,7 +142,7 @@ static int auth_context_match(
}
if (!scheme)
- return -1;
+ return 0;
/* See if authentication has already started for this scheme */
git_vector_foreach(&t->auth_contexts, i, c) {
@@ -188,6 +188,9 @@ static int apply_credentials(git_buf *buf, http_subtransport *t)
if (auth_context_match(&context, t, credtype_match, &cred->credtype) < 0)
return -1;
+ if (!context)
+ return 0;
+
return context->next_token(buf, context, cred);
}