#!/bin/sh
#exec 2> /br/gopher/PUT.log
#set -x
basedir="/br/gopher"
search="$1"
arguments="$2"
host="$3"
port="$4"
traversal="$5"
selector="$6"
# We were requested directly.
case "${selector}" in
"/"*)
exit 0
;;
esac
httppath="$(printf "%s\n" "${selector}" | cut -d' ' -f 2)"
case "${httppath}" in
/radio/stream/play/*)
"$basedir/SOURCE" "$1" "$2" "$3" "$4" "$5" "$6"
;;
esac
printf "HTTP/1.0 404 Not Found\r\n"
printf "Connection: close\r\n"
printf "\r\n"
exit 0
Response: text/plain
| Original URL | gophers://bitreich.org/0/PUT |
|---|---|
| Content-Type | text/plain; charset=utf-8 |