about summary refs log tree commit diff stats
path: root/adapter/finger
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-12-12 20:03:44 +0100
committerbptato <nincsnevem662@gmail.com>2023-12-12 20:03:44 +0100
commit1dcb9cf6567145a0d3705b95717ccbf37eac6140 (patch)
tree8c592cb23a2ca942e9f1c378159c5620865ea322 /adapter/finger
parent189e73f7092a69699f3a6ca39aa105d318baedd4 (diff)
downloadchawan-1dcb9cf6567145a0d3705b95717ccbf37eac6140.tar.gz
adapter/: re-structure
Diffstat (limited to 'adapter/finger')
-rwxr-xr-xadapter/finger/cha-finger39
1 files changed, 0 insertions, 39 deletions
diff --git a/adapter/finger/cha-finger b/adapter/finger/cha-finger
deleted file mode 100755
index e963b339..00000000
--- a/adapter/finger/cha-finger
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh
-# Finger protocol adapter for Chawan. Requires curl.
-# (It does *not* work without the environment variables MAPPED_URI_*, so no
-# w3m support.)
-#
-# Usage: put this script in your cgi-bin folder, then add the following line to
-# your urimethodmap:
-#
-# finger: /cgi-bin/cha-finger?%s
-#
-# Note: the Chawan default configuration already does this, so normally you
-# don't need to do anything to use the finger protocol.
-
-die() {
-	echo "$1"
-	exit 1
-}
-
-type curl >/dev/null || \
-	die "curl must be installed on your computer to use finger."
-
-printf 'Content-Type: text/plain\n\n'
-
-PORT="${MAPPED_URI_PORT:-79}"
-test "$PORT" = 79 || die "Invalid port"
-
-if test -n "$MAPPED_URI_USERNAME"
-then	USER="$MAPPED_URI_USERNAME"
-else	case "$MAPPED_URI_PATH" in
-	/w*) USER="/w ${MAPPED_URI_PATH#/w}" ;;
-	*) USER="$MAPPED_URI_PATH" ;;
-	esac
-fi
-URL="telnet://$MAPPED_URI_HOST:$PORT"
-
-printf '%s\r\n' "$USER" | if test -n "$ALL_PROXY"
-then	curl -x "$ALL_PROXY" -- "$URL"
-else	curl -- "$URL"
-fi 2>/dev/null