From: Todd Zullinger <tmz@pobox.com>
To: git@vger.kernel.org
Cc: Brandon Williams <bmwill@google.com>, Jeff King <peff@peff.net>,
Junio C Hamano <gitster@pobox.com>
Subject: [PATCH] http: fix v1 protocol tests with apache httpd < 2.4
Date: Sat, 30 Dec 2017 21:32:34 -0500 [thread overview]
Message-ID: <20171231023234.21215-1-tmz@pobox.com> (raw)
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>
---
These tests fail with 2.16.0-rc0 on CentOS-6, which uses
httpd-2.2.
I removed the version restriction entirely rather than adjust
the version. I believe SetEnvIf works on httpd >= 2.0. I'm
not sure if we aim to support anything less than httpd 2.0,
but I'm betting not. If that's incorrect, I can add some
IfVersion conditions.
As noted in the commit message, I only tested with httpd 2.2
and 2.4 (on CentOS 6/7 and Fedora 26-28). If anyone has older
httpd systems which need support, it would be great if they
could test this before 2.16.0 is finalized, so we can avoid
shipping with any failing tests.
t/lib-httpd/apache.conf | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/t/lib-httpd/apache.conf b/t/lib-httpd/apache.conf
index df19436314..724d9ae462 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/
--
2.16.0.rc0
next reply other threads:[~2017-12-31 2:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-31 2:32 Todd Zullinger [this message]
2018-01-03 0:21 ` [PATCH] http: fix v1 protocol tests with apache httpd < 2.4 Brandon Williams
2018-01-03 0:39 ` Todd Zullinger
2018-01-03 6:17 ` Jeff King
2018-01-03 16:21 ` Todd Zullinger
2018-01-03 5:56 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171231023234.21215-1-tmz@pobox.com \
--to=tmz@pobox.com \
--cc=bmwill@google.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).