summaryrefslogtreecommitdiff
path: root/t/lib-httpd
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-09-07 18:09:49 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-09-07 18:09:50 (GMT)
commite6dd70e9bfef40d545cb0f452f082bde562e8785 (patch)
tree6ca29bfd8d3a36bfae9508c8756ff81e3a78b224 /t/lib-httpd
parent9192ece94b94ccbc061216517251400db691de86 (diff)
parentb81401c1de0e0fec39f8643ce7a794fda083f7a1 (diff)
downloadgit-e6dd70e9bfef40d545cb0f452f082bde562e8785.zip
git-e6dd70e9bfef40d545cb0f452f082bde562e8785.tar.gz
git-e6dd70e9bfef40d545cb0f452f082bde562e8785.tar.bz2
Merge branch 'jk/maint-http-half-auth-push'
Pushing to smart HTTP server with recent Git fails without having the username in the URL to force authentication, if the server is configured to allow GET anonymously, while requiring authentication for POST. * jk/maint-http-half-auth-push: http: prompt for credentials on failed POST http: factor out http error code handling t: test http access to "half-auth" repositories t: test basic smart-http authentication t/lib-httpd: recognize */smart/* repos as smart-http t/lib-httpd: only route auth/dumb to dumb repos t5550: factor out http auth setup t5550: put auth-required repo in auth/dumb
Diffstat (limited to 't/lib-httpd')
-rw-r--r--t/lib-httpd/apache.conf25
1 files changed, 15 insertions, 10 deletions
diff --git a/t/lib-httpd/apache.conf b/t/lib-httpd/apache.conf
index 36b1596..49d5d87 100644
--- a/t/lib-httpd/apache.conf
+++ b/t/lib-httpd/apache.conf
@@ -46,24 +46,22 @@ PassEnv GIT_VALGRIND
PassEnv GIT_VALGRIND_OPTIONS
Alias /dumb/ www/
-Alias /auth/ www/auth/
+Alias /auth/dumb/ www/auth/dumb/
-<Location /smart/>
+<LocationMatch /smart/>
SetEnv GIT_EXEC_PATH ${GIT_EXEC_PATH}
SetEnv GIT_HTTP_EXPORT_ALL
-</Location>
-<Location /smart_noexport/>
+</LocationMatch>
+<LocationMatch /smart_noexport/>
SetEnv GIT_EXEC_PATH ${GIT_EXEC_PATH}
-</Location>
-<Location /smart_custom_env/>
+</LocationMatch>
+<LocationMatch /smart_custom_env/>
SetEnv GIT_EXEC_PATH ${GIT_EXEC_PATH}
SetEnv GIT_HTTP_EXPORT_ALL
SetEnv GIT_COMMITTER_NAME "Custom User"
SetEnv GIT_COMMITTER_EMAIL custom@example.com
-</Location>
-ScriptAlias /smart/ ${GIT_EXEC_PATH}/git-http-backend/
-ScriptAlias /smart_noexport/ ${GIT_EXEC_PATH}/git-http-backend/
-ScriptAlias /smart_custom_env/ ${GIT_EXEC_PATH}/git-http-backend/
+</LocationMatch>
+ScriptAliasMatch /smart_*[^/]*/(.*) ${GIT_EXEC_PATH}/git-http-backend/$1
<Directory ${GIT_EXEC_PATH}>
Options FollowSymlinks
</Directory>
@@ -94,6 +92,13 @@ SSLEngine On
Require valid-user
</Location>
+<LocationMatch "^/auth-push/.*/git-receive-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