diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-03-10 13:24:23 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-03-10 13:24:23 -0800 |
commit | d0f549f403266c14acc687098ee3e697a67984c2 (patch) | |
tree | ce24b9ce27a85921cab6879dfa1956066fe9ce0d /t/t5550-http-fetch-dumb.sh | |
parent | 92718f57c2e18e69bc7ae3ed18c7157c475e17a9 (diff) | |
parent | 8e27391a5fdc9194c4ed3ed6c64ec4750a1a08b5 (diff) | |
download | git-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 't/t5550-http-fetch-dumb.sh')
-rwxr-xr-x | t/t5550-http-fetch-dumb.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t5550-http-fetch-dumb.sh b/t/t5550-http-fetch-dumb.sh index b69ece1d66..87308cdced 100755 --- a/t/t5550-http-fetch-dumb.sh +++ b/t/t5550-http-fetch-dumb.sh @@ -387,5 +387,14 @@ test_expect_success 'http-alternates triggers not-from-user protocol check' ' clone $HTTPD_URL/dumb/evil.git evil-user ' +test_expect_success 'can redirect through non-"info/refs?service=git-upload-pack" URL' ' + git clone "$HTTPD_URL/redir-to/dumb/repo.git" +' + +test_expect_success 'print HTTP error when any intermediate redirect throws error' ' + test_must_fail git clone "$HTTPD_URL/redir-to/502" 2> stderr && + test_i18ngrep "unable to access.*/redir-to/502" stderr +' + stop_httpd test_done |