@@ -34,17 +34,6 @@ LoadModule http2_module modules/mod_http2.so
3434Protocols h2 h2c
3535</IfDefine>
3636
37- <IfVersion < 2.4>
38- LockFile accept.lock
39- </IfVersion>
40-
41- <IfVersion < 2.1>
42- <IfModule !mod_auth.c>
43- LoadModule auth_module modules/mod_auth.so
44- </IfModule>
45- </IfVersion>
46-
47- <IfVersion >= 2.1>
4837<IfModule !mod_auth_basic.c>
4938 LoadModule auth_basic_module modules/mod_auth_basic.so
5039</IfModule>
@@ -57,9 +46,7 @@ LockFile accept.lock
5746<IfModule !mod_authz_host.c>
5847 LoadModule authz_host_module modules/mod_authz_host.so
5948</IfModule>
60- </IfVersion>
6149
62- <IfVersion >= 2.4>
6350<IfModule !mod_authn_core.c>
6451 LoadModule authn_core_module modules/mod_authn_core.so
6552</IfModule>
@@ -83,7 +70,6 @@ LockFile accept.lock
8370 LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
8471</IfModule>
8572</IfDefine>
86- </IfVersion>
8773
8874PassEnv GIT_VALGRIND
8975PassEnv GIT_VALGRIND_OPTIONS
@@ -123,6 +109,10 @@ Alias /auth/dumb/ www/auth/dumb/
123109 Header set Set-Cookie name=value
124110</LocationMatch>
125111<LocationMatch /smart_headers/>
112+ <RequireAll>
113+ Require expr %{HTTP:x-magic-one} == 'abra'
114+ Require expr %{HTTP:x-magic-two} == 'cadabra'
115+ </RequireAll>
126116 SetEnv GIT_EXEC_PATH ${GIT_EXEC_PATH}
127117 SetEnv GIT_HTTP_EXPORT_ALL
128118</LocationMatch>
@@ -205,18 +195,6 @@ RewriteRule ^/intern-redir/(.*)/foo$ /smart/$1 [PT]
205195RewriteRule ^/redir-objects/(.*/info/refs)$ /dumb/$1 [PT]
206196RewriteRule ^/redir-objects/(.*/objects/.*)$ /dumb/$1 [R=301]
207197
208- # Apache 2.2 does not understand <RequireAll>, so we use RewriteCond.
209- # And as RewriteCond does not allow testing for non-matches, we match
210- # the desired case first (one has abra, two has cadabra), and let it
211- # pass by marking the RewriteRule as [L], "last rule, do not process
212- # any other matching RewriteRules after this"), and then have another
213- # RewriteRule that matches all other cases and lets them fail via '[F]',
214- # "fail the request".
215- RewriteCond %{HTTP:x-magic-one} =abra
216- RewriteCond %{HTTP:x-magic-two} =cadabra
217- RewriteRule ^/smart_headers/.* - [L]
218- RewriteRule ^/smart_headers/.* - [F]
219-
220198<IfDefine SSL>
221199LoadModule ssl_module modules/mod_ssl.so
222200
@@ -225,7 +203,6 @@ SSLCertificateKeyFile httpd.pem
225203SSLRandomSeed startup file:/dev/urandom 512
226204SSLRandomSeed connect file:/dev/urandom 512
227205SSLSessionCache none
228- SSLMutex file:ssl_mutex
229206SSLEngine On
230207</IfDefine>
231208
0 commit comments