From dbcf2bd3dec1244fdbafb3ec7312ed14d83c0025 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Thu, 22 May 2014 05:29:03 -0400 Subject: t5550: test display of remote http error messages Since commit 426e70d (remote-curl: show server content on http errors, 2013-04-05), we relay any text/plain error messages from the remote server to the user. However, we never tested it. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- t/lib-httpd/apache.conf | 4 ++++ t/lib-httpd/error.sh | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100755 t/lib-httpd/error.sh (limited to 't/lib-httpd') diff --git a/t/lib-httpd/apache.conf b/t/lib-httpd/apache.conf index 3a03e8263d..b384d79935 100644 --- a/t/lib-httpd/apache.conf +++ b/t/lib-httpd/apache.conf @@ -97,12 +97,16 @@ Alias /auth/dumb/ www/auth/dumb/ ScriptAliasMatch /smart_*[^/]*/(.*) ${GIT_EXEC_PATH}/git-http-backend/$1 ScriptAlias /broken_smart/ broken-smart-http.sh/ +ScriptAlias /error/ error.sh/ Options FollowSymlinks Options ExecCGI + + Options ExecCGI + Options ExecCGI diff --git a/t/lib-httpd/error.sh b/t/lib-httpd/error.sh new file mode 100755 index 0000000000..786f2816bb --- /dev/null +++ b/t/lib-httpd/error.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +printf "Status: 500 Intentional Breakage\n" + +printf "Content-Type: " +case "$PATH_INFO" in +*html*) + printf "text/html" + ;; +*text*) + printf "text/plain" + ;; +esac +printf "\n" + +printf "\n" +printf "this is the error message\n" -- cgit v1.2.1