summaryrefslogtreecommitdiff
path: root/t/lib-httpd.sh
diff options
context:
space:
mode:
authorJiang Xin <worldhello.net@gmail.com>2023-05-20 08:44:08 +0800
committerJiang Xin <worldhello.net@gmail.com>2023-05-20 08:44:08 +0800
commit68a86d028b9cd53886b8fa5239a5daebc566f21c (patch)
tree7b629def3a66c5dc2aa17cb87d1f4b2a7569e76e /t/lib-httpd.sh
parent03d05937a70900819a5a73583a96bcb1fd06eb68 (diff)
parent9e49351c3060e1fa6e0d2de64505b7becf157f28 (diff)
Merge branch 'master' of github.com:git/git
* 'master' of github.com:git/git: A few more topics after 2.41-rc1 Git 2.41-rc1 t/lib-httpd: make CGIPassAuth support conditional t9001: mark the script as no longer leak checker clean send-email: clear the $message_id after validation upload-pack: advertise capabilities when cloning empty repos A bit more before -rc1 imap-send: include strbuf.h run-command.c: fix missing include under `NO_PTHREADS` test: do not negate test_path_is_* to assert absense t2021: do not negate test_path_is_dir tests: do not negate test_path_exists doc/git-config: add unit for http.lowSpeedLimit rebase -r: fix the total number shown in the progress rebase --update-refs: fix loops attr: teach "--attr-source=<tree>" global option to "git"
Diffstat (limited to 't/lib-httpd.sh')
-rw-r--r--t/lib-httpd.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/lib-httpd.sh b/t/lib-httpd.sh
index 6805229dcb..2fb1b2ae56 100644
--- a/t/lib-httpd.sh
+++ b/t/lib-httpd.sh
@@ -191,6 +191,20 @@ enable_http2 () {
test_set_prereq HTTP2
}
+enable_cgipassauth () {
+ # We are looking for 2.4.13 or more recent. Since we only support
+ # 2.4 and up, no need to check for older major/minor.
+ if test "$HTTPD_VERSION_MAJOR" = 2 &&
+ test "$HTTPD_VERSION_MINOR" = 4 &&
+ test "$(echo $HTTPD_VERSION | cut -d. -f3)" -lt 13
+ then
+ echo >&4 "apache $HTTPD_VERSION too old for CGIPassAuth"
+ return
+ fi
+ HTTPD_PARA="$HTTPD_PARA -DUSE_CGIPASSAUTH"
+ test_set_prereq CGIPASSAUTH
+}
+
start_httpd() {
prepare_httpd >&3 2>&4