summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rwxr-xr-xt/lib-httpd/error.sh8
-rwxr-xr-xt/t5550-http-fetch-dumb.sh5
2 files changed, 12 insertions, 1 deletions
diff --git a/t/lib-httpd/error.sh b/t/lib-httpd/error.sh
index 786f2816bb..23cec97cc3 100755
--- a/t/lib-httpd/error.sh
+++ b/t/lib-httpd/error.sh
@@ -3,6 +3,7 @@
printf "Status: 500 Intentional Breakage\n"
printf "Content-Type: "
+charset=iso-8859-1
case "$PATH_INFO" in
*html*)
printf "text/html"
@@ -10,8 +11,13 @@ case "$PATH_INFO" in
*text*)
printf "text/plain"
;;
+*charset*)
+ printf "text/plain; charset=utf-8"
+ charset=utf-8
+ ;;
esac
printf "\n"
printf "\n"
-printf "this is the error message\n"
+printf "this is the error message\n" |
+iconv -f us-ascii -t $charset
diff --git a/t/t5550-http-fetch-dumb.sh b/t/t5550-http-fetch-dumb.sh
index 13defd3886..b35b2610e3 100755
--- a/t/t5550-http-fetch-dumb.sh
+++ b/t/t5550-http-fetch-dumb.sh
@@ -181,5 +181,10 @@ test_expect_success 'git client does not show html errors' '
! grep "this is the error message" stderr
'
+test_expect_success 'git client shows text/plain with a charset' '
+ test_must_fail git clone "$HTTPD_URL/error/charset" 2>stderr &&
+ grep "this is the error message" stderr
+'
+
stop_httpd
test_done