aboutsummaryrefslogtreecommitdiffstats
path: root/t/lib-httpd/apache.conf
diff options
context:
space:
mode:
authorMatthew John Cheetham <mjcheetham@outlook.com>2023-02-27 17:20:18 +0000
committerJunio C Hamano <gitster@pobox.com>2023-02-27 10:40:40 -0800
commit988aad99b44f3fb3f04f4a75cadf0dbb7ac89ffe (patch)
tree73575f7c1da1441def99ccf6fd49c5a4870bb662 /t/lib-httpd/apache.conf
parentThe fourteenth batch (diff)
downloadgit-988aad99b44f3fb3f04f4a75cadf0dbb7ac89ffe.tar.gz
git-988aad99b44f3fb3f04f4a75cadf0dbb7ac89ffe.zip
t5563: add tests for basic and anoymous HTTP access
Add a test showing simple anoymous HTTP access to an unprotected repository, that results in no credential helper invocations. Also add a test demonstrating simple basic authentication with simple credential helper support. Leverage a no-parsed headers (NPH) CGI script so that we can directly control the HTTP responses to simulate a multitude of good, bad and ugly remote server implementations around auth. Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/lib-httpd/apache.conf')
-rw-r--r--t/lib-httpd/apache.conf6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/lib-httpd/apache.conf b/t/lib-httpd/apache.conf
index 0294739a77..76335cdb24 100644
--- a/t/lib-httpd/apache.conf
+++ b/t/lib-httpd/apache.conf
@@ -135,6 +135,11 @@ Alias /auth/dumb/ www/auth/dumb/
SetEnv GIT_HTTP_EXPORT_ALL
SetEnv GIT_PROTOCOL
</LocationMatch>
+<LocationMatch /custom_auth/>
+ SetEnv GIT_EXEC_PATH ${GIT_EXEC_PATH}
+ SetEnv GIT_HTTP_EXPORT_ALL
+ CGIPassAuth on
+</LocationMatch>
ScriptAlias /smart/incomplete_length/git-upload-pack incomplete-length-upload-pack-v2-http.sh/
ScriptAlias /smart/incomplete_body/git-upload-pack incomplete-body-upload-pack-v2-http.sh/
ScriptAlias /smart/no_report/git-receive-pack error-no-report.sh/
@@ -144,6 +149,7 @@ ScriptAlias /broken_smart/ broken-smart-http.sh/
ScriptAlias /error_smart/ error-smart-http.sh/
ScriptAlias /error/ error.sh/
ScriptAliasMatch /one_time_perl/(.*) apply-one-time-perl.sh/$1
+ScriptAliasMatch /custom_auth/(.*) nph-custom-auth.sh/$1
<Directory ${GIT_EXEC_PATH}>
Options FollowSymlinks
</Directory>