download_strategy: fix mirrors not working
This commit is contained in:
parent
f61e4ee872
commit
9c16089e95
@ -488,7 +488,12 @@ class CurlDownloadStrategy < AbstractFileDownloadStrategy
|
||||
@resolved_info_cache ||= {}
|
||||
return @resolved_info_cache[url] if @resolved_info_cache.include?(url)
|
||||
|
||||
parsed_output = curl_headers(url.to_s, wanted_headers: ["content-disposition"], timeout: timeout)
|
||||
begin
|
||||
parsed_output = curl_headers(url.to_s, wanted_headers: ["content-disposition"], timeout: timeout)
|
||||
rescue ErrorDuringExecution
|
||||
return [url, parse_basename(url), nil, nil, false]
|
||||
end
|
||||
|
||||
parsed_headers = parsed_output.fetch(:responses).map { |r| r.fetch(:headers) }
|
||||
|
||||
final_url = curl_response_follow_redirections(parsed_output.fetch(:responses), url)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user