Commit 4c06f3e7dcc0fb7db635ae655ea982b22adb9bd0

David Brooks 2016-06-19T11:46:43

HTTP authentication scheme name is case insensitive.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/transports/http.c b/src/transports/http.c
index 88b124b..4bf1d91 100644
--- a/src/transports/http.c
+++ b/src/transports/http.c
@@ -114,7 +114,7 @@ static bool challenge_match(git_http_auth_scheme *scheme, void *data)
 	size_t scheme_len;
 
 	scheme_len = strlen(scheme_name);
-	return (strncmp(challenge, scheme_name, scheme_len) == 0 &&
+	return (strncasecmp(challenge, scheme_name, scheme_len) == 0 &&
 		(challenge[scheme_len] == '\0' || challenge[scheme_len] == ' '));
 }