Merge branch 'jk/http-auth-redirects'
Handle the case where http transport gets redirected during the authorization request better. * jk/http-auth-redirects: http.c: Spell the null pointer as NULL remote-curl: rewrite base url from info/refs redirects remote-curl: store url as a strbuf remote-curl: make refs_url a strbuf http: update base URLs when we see redirects http: provide effective url to callers http: hoist credential request out of handle_curl_result http: refactor options to http_get_* http_request: factor out curlinfo_strbuf http_get_file: style fixes
This commit is contained in:
@ -1542,7 +1542,7 @@ static int remote_exists(const char *path)
|
||||
|
||||
sprintf(url, "%s%s", repo->url, path);
|
||||
|
||||
switch (http_get_strbuf(url, NULL, NULL, 0)) {
|
||||
switch (http_get_strbuf(url, NULL, NULL)) {
|
||||
case HTTP_OK:
|
||||
ret = 1;
|
||||
break;
|
||||
@ -1566,7 +1566,7 @@ static void fetch_symref(const char *path, char **symref, unsigned char *sha1)
|
||||
url = xmalloc(strlen(repo->url) + strlen(path) + 1);
|
||||
sprintf(url, "%s%s", repo->url, path);
|
||||
|
||||
if (http_get_strbuf(url, NULL, &buffer, 0) != HTTP_OK)
|
||||
if (http_get_strbuf(url, &buffer, NULL) != HTTP_OK)
|
||||
die("Couldn't get %s for remote symref\n%s", url,
|
||||
curl_errorstr);
|
||||
free(url);
|
||||
|
||||
Reference in New Issue
Block a user