summaryrefslogtreecommitdiff
path: root/t/lib-httpd
diff options
context:
space:
mode:
authorTodd Zullinger <tmz@pobox.com>2017-12-31 02:32:34 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-01-04 18:45:57 (GMT)
commita812952aab1c889528ce941c99e0d8a6db05a754 (patch)
treeda8e33104b3d52a95136cbc1d025111095555147 /t/lib-httpd
parent6464679d9620d91b639e2681b9cc6473f3856d09 (diff)
downloadgit-a812952aab1c889528ce941c99e0d8a6db05a754.zip
git-a812952aab1c889528ce941c99e0d8a6db05a754.tar.gz
git-a812952aab1c889528ce941c99e0d8a6db05a754.tar.bz2
http: fix v1 protocol tests with apache httpd < 2.4
The apache config used by tests was updated to use the SetEnvIf directive to set the Git-Protocol header in 19113a26b6 ("http: tell server that the client understands v1", 2017-10-16). Setting the Git-Protocol header is restricted to httpd >= 2.4, but mod_setenvif and the SetEnvIf directive work with lower versions, at least as far back as 2.0, according to the httpd documentation: https://httpd.apache.org/docs/2.0/mod/mod_setenvif.html Drop the restriction. Tested with httpd 2.2 and 2.4. Signed-off-by: Todd Zullinger <tmz@pobox.com> Acked-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/lib-httpd')
-rw-r--r--t/lib-httpd/apache.conf10
1 files changed, 4 insertions, 6 deletions
diff --git a/t/lib-httpd/apache.conf b/t/lib-httpd/apache.conf
index df19436..724d9ae 100644
--- a/t/lib-httpd/apache.conf
+++ b/t/lib-httpd/apache.conf
@@ -25,6 +25,9 @@ ErrorLog error.log
<IfModule !mod_headers.c>
LoadModule headers_module modules/mod_headers.so
</IfModule>
+<IfModule !mod_setenvif.c>
+ LoadModule setenvif_module modules/mod_setenvif.so
+</IfModule>
<IfVersion < 2.4>
LockFile accept.lock
@@ -67,9 +70,6 @@ LockFile accept.lock
<IfModule !mod_unixd.c>
LoadModule unixd_module modules/mod_unixd.so
</IfModule>
-<IfModule !mod_setenvif.c>
- LoadModule setenvif_module modules/mod_setenvif.so
-</IfModule>
</IfVersion>
PassEnv GIT_VALGRIND
@@ -79,9 +79,7 @@ PassEnv ASAN_OPTIONS
PassEnv GIT_TRACE
PassEnv GIT_CONFIG_NOSYSTEM
-<IfVersion >= 2.4>
- SetEnvIf Git-Protocol ".*" GIT_PROTOCOL=$0
-</IfVersion>
+SetEnvIf Git-Protocol ".*" GIT_PROTOCOL=$0
Alias /dumb/ www/
Alias /auth/dumb/ www/auth/dumb/