From bcca15671a10dae0aad90ec0309311efd2979e28 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Sat, 22 Dec 2018 21:17:52 +0100 Subject: [PATCH] Manually follow redirects --- addon/lib/rmupdate.tcl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/addon/lib/rmupdate.tcl b/addon/lib/rmupdate.tcl index 391d022..085f8f1 100644 --- a/addon/lib/rmupdate.tcl +++ b/addon/lib/rmupdate.tcl @@ -1521,6 +1521,11 @@ proc ::rmupdate::get_addon_info {{fetch_available_version 0} {fetch_download_url } else { # Not a direct download link set data3 [exec /usr/bin/wget --no-check-certificate --quiet --output-document=- "${download_url}"] + write_log 4 $data3 + if {[regexp {meta.*http-equiv.*refresh.*url=(.*)['"][\s/>]} $data3 match href]} { + set download_url $href + set data3 [exec /usr/bin/wget --no-check-certificate --quiet --output-document=- "${href}"] + } set best_prio 0 set best_href "" regsub -all {\.} $available_version "\\." regex_version @@ -1530,6 +1535,7 @@ proc ::rmupdate::get_addon_info {{fetch_available_version 0} {fetch_download_url regsub -all {]*\shref\s*=\s*"([^"]+)"[^>]*>(.*)