2014-05-22 13:29:03 +04:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
printf "Status: 500 Intentional Breakage\n"
|
|
|
|
|
|
|
|
printf "Content-Type: "
|
2014-05-22 13:29:47 +04:00
|
|
|
charset=iso-8859-1
|
2014-05-22 13:29:03 +04:00
|
|
|
case "$PATH_INFO" in
|
|
|
|
*html*)
|
|
|
|
printf "text/html"
|
|
|
|
;;
|
|
|
|
*text*)
|
|
|
|
printf "text/plain"
|
|
|
|
;;
|
2014-05-22 13:29:47 +04:00
|
|
|
*charset*)
|
|
|
|
printf "text/plain; charset=utf-8"
|
|
|
|
charset=utf-8
|
|
|
|
;;
|
2014-05-22 13:30:29 +04:00
|
|
|
*utf16*)
|
|
|
|
printf "text/plain; charset=utf-16"
|
|
|
|
charset=utf-16
|
|
|
|
;;
|
2014-06-18 02:11:53 +04:00
|
|
|
*odd-spacing*)
|
|
|
|
printf "text/plain; foo=bar ;charset=utf-16; other=nonsense"
|
|
|
|
charset=utf-16
|
|
|
|
;;
|
2014-05-22 13:29:03 +04:00
|
|
|
esac
|
|
|
|
printf "\n"
|
|
|
|
|
|
|
|
printf "\n"
|
2014-05-22 13:29:47 +04:00
|
|
|
printf "this is the error message\n" |
|
|
|
|
iconv -f us-ascii -t $charset
|