Commit 2e93feca authored by Vitaly Lipatov's avatar Vitaly Lipatov

eget: fall back to original URL for signed CDN redirects with UUID paths

parent e1f40cce
Pipeline #17517 passed with stage
in 19 seconds
...@@ -2103,8 +2103,10 @@ url_get_filename() ...@@ -2103,8 +2103,10 @@ url_get_filename()
fi fi
local loc="$(url_get_raw_real_url "$URL")" local loc="$(url_get_raw_real_url "$URL")"
# signed CDN redirects (e.g. GitHub release assets) put a UUID in the path
# and the real filename in a query parameter — fall back to original URL
if is_strange_url "$loc" ; then if is_strange_url "$loc" ; then
loc="$(echo "$loc" | sed -e "s|\?.*||")" loc="$URL"
fi fi
# hack for redirect to the main page (root URL with no filename) # hack for redirect to the main page (root URL with no filename)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment