From: Junio C Hamano Date: Tue, 17 May 2016 21:38:35 +0000 (-0700) Subject: Merge branch 'js/http-custom-headers' X-Git-Tag: v2.9.0-rc0~21 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/848b99b14e5287b492f095ca1ca6bce270880015?ds=inline;hp=-c Merge branch 'js/http-custom-headers' Update tests for "http.extraHeaders=
" to be portable back to Apache 2.2 (the original depended on which is a more recent feature). * js/http-custom-headers: submodule: ensure that -c http.extraheader is heeded t5551: make the test for extra HTTP headers more robust tests: adjust the configuration for Apache 2.2 --- 848b99b14e5287b492f095ca1ca6bce270880015 diff --combined t/lib-httpd/apache.conf index b8ed96fac6,2dcbb00865..018a83a5a1 --- a/t/lib-httpd/apache.conf +++ b/t/lib-httpd/apache.conf @@@ -74,7 -74,6 +74,7 @@@ PassEnv GIT_VALGRIND_OPTION PassEnv GNUPGHOME PassEnv ASAN_OPTIONS PassEnv GIT_TRACE +PassEnv GIT_CONFIG_NOSYSTEM Alias /dumb/ www/ Alias /auth/dumb/ www/auth/dumb/ @@@ -103,10 -102,6 +103,6 @@@ Header set Set-Cookie name=value - - Require expr %{HTTP:x-magic-one} == 'abra' - Require expr %{HTTP:x-magic-two} == 'cadabra' - SetEnv GIT_EXEC_PATH ${GIT_EXEC_PATH} SetEnv GIT_HTTP_EXPORT_ALL @@@ -136,6 -131,18 +132,18 @@@ RewriteRule ^/ftp-redir/(.*)$ ftp://loc RewriteRule ^/loop-redir/x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-(.*) /$1 [R=302] RewriteRule ^/loop-redir/(.*)$ /loop-redir/x-$1 [R=302] + # Apache 2.2 does not understand , so we use RewriteCond. + # And as RewriteCond does not allow testing for non-matches, we match + # the desired case first (one has abra, two has cadabra), and let it + # pass by marking the RewriteRule as [L], "last rule, do not process + # any other matching RewriteRules after this"), and then have another + # RewriteRule that matches all other cases and lets them fail via '[F]', + # "fail the request". + RewriteCond %{HTTP:x-magic-one} =abra + RewriteCond %{HTTP:x-magic-two} =cadabra + RewriteRule ^/smart_headers/.* - [L] + RewriteRule ^/smart_headers/.* - [F] + LoadModule ssl_module modules/mod_ssl.so