#!/bin/sh

BODY="$(/usr/games/fortune)"
LENGTH=$((${#BODY} + 1)) # body + newline

cat <<EOS
HTTP/1.0 200 OK
Content-Type: text/html
Content-Length: ${LENGTH}

${BODY}
EOS

#!/bin/sh

BODY="$(/usr/games/fortune)"
LENGTH=$((${#BODY} + 1)) # body + newline

cat <<EOS
HTTP/1.0 200 OK
Content-Type: text/plain; charset=utf-8
Content-Length: ${LENGTH}

${BODY}
EOS

Set text encoding to plain utf8
Set text encoding to plain utf8
