From 3a485618e493ac646dbac295b2d7940d43e15551 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Fri, 1 Apr 2022 11:14:37 +0200 Subject: bugfix: checking onions wouldn't work, and wouldn't report a failure That's because "$torconf" would become one argument to curl when it has to be two. --- scripts/testurl.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/testurl.sh b/scripts/testurl.sh index 0607bae..a7b49f2 100755 --- a/scripts/testurl.sh +++ b/scripts/testurl.sh @@ -12,12 +12,12 @@ set -eu URL="$1"; shift -torconf= -echo "$URL" | grep -q \\.onion && torconf="-x socks4a://127.0.0.1:9050/" +curl="curl" +echo "$URL" | grep -q \\.onion && curl="$curl -x socks4a://127.0.0.1:9050/" function testurl() { family="-$1" - response=$(curl "$family" -L -s -w "%{http_code}" "$torconf" "$URL") + response=$($curl "$family" -L -s -w "%{http_code}" "$URL") http_code=$(tail -n1 <<< "$response") if [[ "$http_code" != 200 ]]; then -- cgit v1.2.3