Jeff King | dbcf2bd | 2014-05-22 05:29:03 -0400 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | printf "Status: 500 Intentional Breakage\n" |
| 4 | |
| 5 | printf "Content-Type: " |
Jeff King | bf197fd | 2014-05-22 05:29:47 -0400 | [diff] [blame] | 6 | charset=iso-8859-1 |
Jeff King | dbcf2bd | 2014-05-22 05:29:03 -0400 | [diff] [blame] | 7 | case "$PATH_INFO" in |
| 8 | *html*) |
| 9 | printf "text/html" |
| 10 | ;; |
| 11 | *text*) |
| 12 | printf "text/plain" |
| 13 | ;; |
Jeff King | bf197fd | 2014-05-22 05:29:47 -0400 | [diff] [blame] | 14 | *charset*) |
| 15 | printf "text/plain; charset=utf-8" |
| 16 | charset=utf-8 |
| 17 | ;; |
Jeff King | fc1b774 | 2014-05-22 05:30:29 -0400 | [diff] [blame] | 18 | *utf16*) |
| 19 | printf "text/plain; charset=utf-16" |
| 20 | charset=utf-16 |
| 21 | ;; |
Yi EungJun | f34a655 | 2014-06-18 07:11:53 +0900 | [diff] [blame] | 22 | *odd-spacing*) |
| 23 | printf "text/plain; foo=bar ;charset=utf-16; other=nonsense" |
| 24 | charset=utf-16 |
| 25 | ;; |
Jeff King | dbcf2bd | 2014-05-22 05:29:03 -0400 | [diff] [blame] | 26 | esac |
| 27 | printf "\n" |
| 28 | |
| 29 | printf "\n" |
Jeff King | bf197fd | 2014-05-22 05:29:47 -0400 | [diff] [blame] | 30 | printf "this is the error message\n" | |
| 31 | iconv -f us-ascii -t $charset |