diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-03-17 14:03:10 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-03-17 14:03:10 -0700 |
commit | 92c56da09683fa3331668adec073b6769da8f0b7 (patch) | |
tree | b114e12cbf97692ce1e07af74616d8b38cda0408 /credential.c | |
parent | af5388d2ddb0bc7c22fbe698078f4ca07879d954 (diff) | |
parent | 5f2117b24f568ecc789c677748d70ccd538b16ba (diff) | |
download | git-92c56da09683fa3331668adec073b6769da8f0b7.tar.gz |
Merge branch 'mc/credential-helper-www-authenticate'
Allow information carried on the WWW-AUthenticate header to be
passed to the credential helpers.
* mc/credential-helper-www-authenticate:
credential: add WWW-Authenticate header to cred requests
http: read HTTP WWW-Authenticate response headers
t5563: add tests for basic and anoymous HTTP access
Diffstat (limited to 'credential.c')
-rw-r--r-- | credential.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/credential.c b/credential.c index f32011343f..ea40a2a410 100644 --- a/credential.c +++ b/credential.c @@ -23,6 +23,7 @@ void credential_clear(struct credential *c) free(c->username); free(c->password); string_list_clear(&c->helpers, 0); + strvec_clear(&c->wwwauth_headers); credential_init(c); } @@ -280,6 +281,8 @@ void credential_write(const struct credential *c, FILE *fp) credential_write_item(fp, "password_expiry_utc", s, 0); free(s); } + for (size_t i = 0; i < c->wwwauth_headers.nr; i++) + credential_write_item(fp, "wwwauth[]", c->wwwauth_headers.v[i], 0); } static int run_credential_helper(struct credential *c, |