t / lib-httpd / error.shon commit Merge branch 'sp/complete-ext-alias' (af6ba0e)
   1#!/bin/sh
   2
   3printf "Status: 500 Intentional Breakage\n"
   4
   5printf "Content-Type: "
   6charset=iso-8859-1
   7case "$PATH_INFO" in
   8*html*)
   9        printf "text/html"
  10        ;;
  11*text*)
  12        printf "text/plain"
  13        ;;
  14*charset*)
  15        printf "text/plain; charset=utf-8"
  16        charset=utf-8
  17        ;;
  18*utf16*)
  19        printf "text/plain; charset=utf-16"
  20        charset=utf-16
  21        ;;
  22esac
  23printf "\n"
  24
  25printf "\n"
  26printf "this is the error message\n" |
  27iconv -f us-ascii -t $charset