X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dead%2Fwhatever-dl.git;a=blobdiff_plain;f=src%2Fopen_uri_downloader.rb;h=e55c0fa7d0e60635b29b1d27b2f843f27da2d873;hp=06c9b3d3b26d9b46ca5b070402bd3f7ce494bbd6;hb=05f6c664ebd77e194656a828855d74d2c4959d85;hpb=e91a9668c7be92d33a29d3645590195aaa1a3daa diff --git a/src/open_uri_downloader.rb b/src/open_uri_downloader.rb index 06c9b3d..e55c0fa 100644 --- a/src/open_uri_downloader.rb +++ b/src/open_uri_downloader.rb @@ -20,7 +20,7 @@ require 'src/uri_utilities' class OpenUriDownloader < Downloader - def download(url, outfile, continue=false) + def download(url, outfile, headers = {}, continue = false) if File.exists?(outfile) raise IOError.new("Output file already exists. Please remove #{outfile}, and try again.") end @@ -31,7 +31,7 @@ class OpenUriDownloader < Downloader puts "Fetching #{url}" puts "Saving as #{outfile}." puts '' - uu.download_with_progress_bar(uri, outfile) + uu.download_with_progress_bar(uri, outfile, headers) end end