summaryrefslogtreecommitdiff
path: root/t/lib-httpd
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2014-05-22 09:30:29 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-05-27 16:59:22 (GMT)
commitfc1b774c72990f0ff92370316412b19fd72baa77 (patch)
tree8f0edeb30a61f3871c65234b59e1f72c1f989cb0 /t/lib-httpd
parentd4241f52d1a19bf464d63cbc4cd67fcc6a3af01d (diff)
downloadgit-fc1b774c72990f0ff92370316412b19fd72baa77.zip
git-fc1b774c72990f0ff92370316412b19fd72baa77.tar.gz
git-fc1b774c72990f0ff92370316412b19fd72baa77.tar.bz2
remote-curl: reencode http error messages
We currently recognize an error message with a content-type "text/plain; charset=utf-16" as text, but we ignore the charset parameter entirely. Let's encode it to log_output_encoding, which is presumably something the user's terminal can handle. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/lib-httpd')
-rwxr-xr-xt/lib-httpd/error.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/t/lib-httpd/error.sh b/t/lib-httpd/error.sh
index 23cec97..eafc9d2 100755
--- a/t/lib-httpd/error.sh
+++ b/t/lib-httpd/error.sh
@@ -15,6 +15,10 @@ case "$PATH_INFO" in
printf "text/plain; charset=utf-8"
charset=utf-8
;;
+*utf16*)
+ printf "text/plain; charset=utf-16"
+ charset=utf-16
+ ;;
esac
printf "\n"