aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-11-20 10:30:17 -0800
committerJunio C Hamano <gitster@pobox.com>2012-11-20 10:30:17 -0800
commita9bb4e55a3a552a705f8a6222e4523ed27bb7cc8 (patch)
tree3988956212f4ec2ab4ba1c31a6570f282247f145 /t
parent80dfab86cd36a25cc5ea8124a1b3946e94d200b5 (diff)
parent2e736fd5e94c6fa44ba95d81a5b0ae407b968b78 (diff)
downloadgit-a9bb4e55a3a552a705f8a6222e4523ed27bb7cc8.tar.gz
git-a9bb4e55a3a552a705f8a6222e4523ed27bb7cc8.tar.xz
Merge branch 'jk/maint-http-half-auth-fetch'
Fixes fetch from servers that ask for auth only during the actual packing phase. This is not really a recommended configuration, but it cleans up the code at the same time. * jk/maint-http-half-auth-fetch: remote-curl: retry failed requests for auth even with gzip remote-curl: hoist gzip buffer size to top of post_rpc
Diffstat (limited to 't')
-rw-r--r--t/lib-httpd/apache.conf7
-rwxr-xr-xt/t5551-http-fetch.sh15
2 files changed, 22 insertions, 0 deletions
diff --git a/t/lib-httpd/apache.conf b/t/lib-httpd/apache.conf
index 49d5d877c..fe76e84b7 100644
--- a/t/lib-httpd/apache.conf
+++ b/t/lib-httpd/apache.conf
@@ -99,6 +99,13 @@ SSLEngine On
Require valid-user
</LocationMatch>
+<LocationMatch "^/auth-fetch/.*/git-upload-pack$">
+ AuthType Basic
+ AuthName "git-auth"
+ AuthUserFile passwd
+ Require valid-user
+</LocationMatch>
+
<IfDefine DAV>
LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so
diff --git a/t/t5551-http-fetch.sh b/t/t5551-http-fetch.sh
index 5060879d6..c5cd2e348 100755
--- a/t/t5551-http-fetch.sh
+++ b/t/t5551-http-fetch.sh
@@ -130,6 +130,21 @@ test_expect_success 'clone from auth-only-for-push repository' '
test_cmp expect actual
'
+test_expect_success 'clone from auth-only-for-objects repository' '
+ echo two >expect &&
+ set_askpass user@host &&
+ git clone --bare "$HTTPD_URL/auth-fetch/smart/repo.git" half-auth &&
+ expect_askpass both user@host &&
+ git --git-dir=half-auth log -1 --format=%s >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'no-op half-auth fetch does not require a password' '
+ set_askpass wrong &&
+ git --git-dir=half-auth fetch &&
+ expect_askpass none
+'
+
test_expect_success 'disable dumb http on server' '
git --git-dir="$HTTPD_DOCUMENT_ROOT_PATH/repo.git" \
config http.getanyfile false