summaryrefslogtreecommitdiff
path: root/http.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-03-10 13:24:23 -0800
committerJunio C Hamano <gitster@pobox.com>2017-03-10 13:24:23 -0800
commitd0f549f403266c14acc687098ee3e697a67984c2 (patch)
treece24b9ce27a85921cab6879dfa1956066fe9ce0d /http.c
parent92718f57c2e18e69bc7ae3ed18c7157c475e17a9 (diff)
parent8e27391a5fdc9194c4ed3ed6c64ec4750a1a08b5 (diff)
downloadgit-d0f549f403266c14acc687098ee3e697a67984c2.tar.gz
Merge branch 'jt/http-base-url-update-upon-redirect'
When a redirected http transport gets an error during the redirected request, we ignored the error we got from the server, and ended up giving a not-so-useful error message. * jt/http-base-url-update-upon-redirect: http: attempt updating base URL only if no error
Diffstat (limited to 'http.c')
-rw-r--r--http.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/http.c b/http.c
index d2d6899b99..96d84bbed3 100644
--- a/http.c
+++ b/http.c
@@ -1769,6 +1769,9 @@ static int http_request_reauth(const char *url,
{
int ret = http_request(url, result, target, options);
+ if (ret != HTTP_OK && ret != HTTP_REAUTH)
+ return ret;
+
if (options && options->effective_url && options->base_url) {
if (update_url_from_redirect(options->base_url,
url, options->effective_url)) {