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>
This commit is contained in:
Jeff King
2014-05-22 05:30:29 -04:00
committed by Junio C Hamano
parent d4241f52d1
commit fc1b774c72
3 changed files with 19 additions and 7 deletions

View File

@ -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"