-- Leo's gemini proxy

-- Connecting to git.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

repo: actpub
action: commit
revision:
path_from:
revision_from: 0c8d3c1dec0971b32b9d56bbc925db38fe3bd583:
path_to:
revision_to:

git.thebackupbox.net

actpub

git://git.thebackupbox.net/actpub

commit 0c8d3c1dec0971b32b9d56bbc925db38fe3bd583
Author: epoch <epoch@thebackupbox.net>
Date:   Sun Oct 1 03:05:34 2023 -0500

    webfinger acts less weird when there is no @ and it will follow redirects now.

diff --git a/webfinger b/webfinger

index 319d8888e9970fffb5a837e2dc88ee4054b046a5..

index ..c152c4d124ac62dbc7b5982435bd32f574f06be9 100755

--- a/webfinger
+++ b/webfinger
@@ -13,12 +13,12 @@ if [ "$1" = "@" -o "$1" = "" ];then
   exit 1
 fi
 user="$(printf '%s\n' "$1" | sed 's/^@//' | cut -d@ -f1)"
-domain="$(printf '%s\n' "$1" | sed 's/^@//' | cut -d@ -f2)"
+domain="$(printf '%s\n' "$1" | sed 's/^@//' | grep '@' | cut -d@ -f2)"
 mkdir -p ~/.cache/webfinger
 cache_file=~/.cache/webfinger/${user}@${domain}
 if [ ! -s "${cache_file}" -o "${no_cache}" = 1 ];then
   printf "webfinger: downloading webfinger for %s@%s\n" "${user}" "${domain}" >&2
-  wget -qO "${cache_file}" "https://${domain}/.well-known/webfinger?resource=acct:${user}@${domain}"
+  curl -Ls "https://${domain}/.well-known/webfinger?resource=acct:${user}@${domain}" > "${cache_file}"
 else
   printf "webfinger: using cached webfinger for %s@%s\n" "${user}" "${domain}" >&2
 fi

-----END OF PAGE-----

-- Response ended

-- Page fetched on Sun Jun 2 18:09:41 2024