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>
Todd Zullinger committed
Dec 30, 2017 at 21:32 UTC
a812952aab1c889528ce941c99e0d8a6db05a754
1 file changed
+4
-6
t/lib-httpd/apache.conf
+4
-6
@@ -25,6 +25,9 @@ ErrorLog error.log
25
<IfModule !mod_headers.c>
26
LoadModule headers_module modules/mod_headers.so
27
</IfModule>
28
+<IfModule !mod_setenvif.c>
29
+ LoadModule setenvif_module modules/mod_setenvif.so
30
+</IfModule>
31
32
<IfVersion < 2.4>
33
LockFile accept.lock
@@ -67,9 +70,6 @@ LockFile accept.lock
70
<IfModule !mod_unixd.c>
71
LoadModule unixd_module modules/mod_unixd.so
72
</IfModule>
70
-<IfModule !mod_setenvif.c>
71
- LoadModule setenvif_module modules/mod_setenvif.so
72
-</IfModule>
73
</IfVersion>
74
75
PassEnv GIT_VALGRIND
@@ -79,9 +79,7 @@ PassEnv ASAN_OPTIONS
79
PassEnv GIT_TRACE
80
PassEnv GIT_CONFIG_NOSYSTEM
81
82
-<IfVersion >= 2.4>
83
- SetEnvIf Git-Protocol ".*" GIT_PROTOCOL=$0
84
-</IfVersion>
82
+SetEnvIf Git-Protocol ".*" GIT_PROTOCOL=$0
83
84
Alias /dumb/ www/
85
Alias /auth/dumb/ www/auth/dumb/