summaryrefslogtreecommitdiff
path: root/http.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-03-16 20:56:42 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-03-16 20:56:42 (GMT)
commit68e12d7d97e1c1a853ac4c603b06afa051cf1276 (patch)
tree9133b44f5fb20c6d78108162c1bfbf81b93a74c8 /http.c
parent8e87cbc740493f8b0619642a680943df04742714 (diff)
parent8e27391a5fdc9194c4ed3ed6c64ec4750a1a08b5 (diff)
downloadgit-68e12d7d97e1c1a853ac4c603b06afa051cf1276.zip
git-68e12d7d97e1c1a853ac4c603b06afa051cf1276.tar.gz
git-68e12d7d97e1c1a853ac4c603b06afa051cf1276.tar.bz2
Merge branch 'jt/http-base-url-update-upon-redirect' into maint
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 d2d6899..96d84bb 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)) {