summaryrefslogtreecommitdiff
path: root/t/lib-httpd/error.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/lib-httpd/error.sh')
-rwxr-xr-xt/lib-httpd/error.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/t/lib-httpd/error.sh b/t/lib-httpd/error.sh
new file mode 100755
index 0000000..eafc9d2
--- /dev/null
+++ b/t/lib-httpd/error.sh
@@ -0,0 +1,27 @@
+#!/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