Merge branch 'jk/http-auth'

* jk/http-auth:
  http_init: accept separate URL parameter
  http: use hostname in credential description
  http: retry authentication failures for all http requests
  remote-curl: don't retry auth failures with dumb protocol
  improve httpd auth tests
  url: decode buffers that are not NUL-terminated
This commit is contained in:
Junio C Hamano
2011-10-17 21:37:15 -07:00
9 changed files with 133 additions and 72 deletions

View File

@ -115,7 +115,7 @@ static struct discovery* discover_refs(const char *service)
http_ret = http_get_strbuf(refs_url, &buffer, HTTP_NO_CACHE);
/* try again with "plain" url (no ? or & appended) */
if (http_ret != HTTP_OK) {
if (http_ret != HTTP_OK && http_ret != HTTP_NOAUTH) {
free(refs_url);
strbuf_reset(&buffer);
@ -859,7 +859,7 @@ int main(int argc, const char **argv)
url = strbuf_detach(&buf, NULL);
http_init(remote);
http_init(remote, url);
do {
if (strbuf_getline(&buf, stdin, '\n') == EOF) {