Commit 8b3800601866b8a579a1787089673edc6380c1eb

Carlos Martín Nieto 2015-06-29T21:12:44

http: don't give up on auth on the first try When the server rejects an authentication request, ask the caller for the credentials again, instead of giving up on the first try.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/src/transports/http.c b/src/transports/http.c
index bae2a32..2110f32 100644
--- a/src/transports/http.c
+++ b/src/transports/http.c
@@ -336,8 +336,7 @@ static int on_headers_complete(http_parser *parser)
 		if (!t->owner->cred_acquire_cb) {
 			no_callback = 1;
 		} else {
-			if (allowed_auth_types &&
-			    (!t->cred || 0 == (t->cred->credtype & allowed_auth_types))) {
+			if (allowed_auth_types) {
 
 				error = t->owner->cred_acquire_cb(&t->cred,
 								  t->owner->url,