commit 34e97e4cf33b00e567ee66cf3517d0a7ba4dacb2
parent 5187e75566751cc2174dc81066de37f126ffbfd7
Author: Solderpunk <solderpunk@sdf.org>
Date: Sun, 31 May 2020 14:23:30 +0200
Fix redirect logic.
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/av98.py b/av98.py
@@ -427,8 +427,12 @@ Slow internet connection? Use 'set timeout' to be more patient.""")
# Never follow cross-protocol redirects without asking
elif new_gi.scheme != gi.scheme:
follow = input("Follow cross-protocol redirect to %s? (y/n) " % new_gi.url)
+ # Don't follow *any* redirect without asking if auto-follow is off
elif not self.options["auto_follow_redirects"]:
follow = input("Follow redirect to %s? (y/n) " % new_gi.url)
+ # Otherwise, follow away
+ else:
+ follow == "yes"
if follow.strip().lower() not in ("y", "yes"):
return
self._debug("Following redirect to %s." % new_gi.url)