From 75871161ba1bea293024d53086f4d8995620a43a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jake=20Buchholz=20G=C3=B6kt=C3=BCrk?= Date: Sun, 14 Jun 2026 19:27:53 -0700 Subject: [PATCH] fix fake wget --- tests/bin/wget | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/bin/wget b/tests/bin/wget index f720c85..a8ef8b0 100755 --- a/tests/bin/wget +++ b/tests/bin/wget @@ -78,9 +78,11 @@ for url; do esac done -host="${url#http*://}" -host="${host%%/*}" -path="${url#http*://$host}" +url_no_scheme="${url#*://}" +case "$url_no_scheme" in + */*) host="${url_no_scheme%%/*}"; path="/${url_no_scheme#*/}";; + *) host="$url_no_scheme"; path=/;; +esac path="${path#${WGET_STRIP_PREFIX:-/}}" path="${path%\?*}" [ -n "$WGET_HOST_LOG" ] && echo "$host" >> "$WGET_HOST_LOG"