Commit 0c8c72b2 authored by Vitaly Lipatov's avatar Vitaly Lipatov

eget: restore missed protocol in real url

parent 79c21706
...@@ -1222,6 +1222,10 @@ url_get_raw_real_url() ...@@ -1222,6 +1222,10 @@ url_get_raw_real_url()
local loc local loc
for loc in $(url_get_header "$URL" "Location" | tac | sed -e 's| .*||') ; do for loc in $(url_get_header "$URL" "Location" | tac | sed -e 's| .*||') ; do
# add protocol if missed
if echo "$loc" | grep -q '^//' ; then
loc="$(echo "$URL" | sed -e 's|//.*||')$loc"
fi
# hack for construct full url from related Location # hack for construct full url from related Location
if is_abs_path "$loc" ; then if is_abs_path "$loc" ; then
loc="$(concatenate_url_and_filename "$(get_host_only "$URL")" "$loc")" #" loc="$(concatenate_url_and_filename "$(get_host_only "$URL")" "$loc")" #"
......
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