Skip to content

Commit a812952

Browse files
tmzullingergitster
authored andcommitted
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 19113a2 ("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 <[email protected]> Acked-by: Brandon Williams <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6464679 commit a812952

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

t/lib-httpd/apache.conf

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ ErrorLog error.log
2525
<IfModule !mod_headers.c>
2626
LoadModule headers_module modules/mod_headers.so
2727
</IfModule>
28+
<IfModule !mod_setenvif.c>
29+
LoadModule setenvif_module modules/mod_setenvif.so
30+
</IfModule>
2831

2932
<IfVersion < 2.4>
3033
LockFile accept.lock
@@ -67,9 +70,6 @@ LockFile accept.lock
6770
<IfModule !mod_unixd.c>
6871
LoadModule unixd_module modules/mod_unixd.so
6972
</IfModule>
70-
<IfModule !mod_setenvif.c>
71-
LoadModule setenvif_module modules/mod_setenvif.so
72-
</IfModule>
7373
</IfVersion>
7474

7575
PassEnv GIT_VALGRIND
@@ -79,9 +79,7 @@ PassEnv ASAN_OPTIONS
7979
PassEnv GIT_TRACE
8080
PassEnv GIT_CONFIG_NOSYSTEM
8181

82-
<IfVersion >= 2.4>
83-
SetEnvIf Git-Protocol ".*" GIT_PROTOCOL=$0
84-
</IfVersion>
82+
SetEnvIf Git-Protocol ".*" GIT_PROTOCOL=$0
8583

8684
Alias /dumb/ www/
8785
Alias /auth/dumb/ www/auth/dumb/

0 commit comments

Comments
 (0)