mirror of
https://github.com/git/git.git
synced 2024-11-05 08:47:56 +01:00
fc1b774c72
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>
27 lines
416 B
Bash
Executable file
27 lines
416 B
Bash
Executable file
#!/bin/sh
|
|
|
|
printf "Status: 500 Intentional Breakage\n"
|
|
|
|
printf "Content-Type: "
|
|
charset=iso-8859-1
|
|
case "$PATH_INFO" in
|
|
*html*)
|
|
printf "text/html"
|
|
;;
|
|
*text*)
|
|
printf "text/plain"
|
|
;;
|
|
*charset*)
|
|
printf "text/plain; charset=utf-8"
|
|
charset=utf-8
|
|
;;
|
|
*utf16*)
|
|
printf "text/plain; charset=utf-16"
|
|
charset=utf-16
|
|
;;
|
|
esac
|
|
printf "\n"
|
|
|
|
printf "\n"
|
|
printf "this is the error message\n" |
|
|
iconv -f us-ascii -t $charset
|