lib/down.rb in down-1.0.0 vs lib/down.rb in down-1.0.1

- old
+ new

@@ -20,10 +20,11 @@ progress_proc: proc { |current_size| raise Down::TooLarge if options[:max_size] && current_size > options[:max_size] options[:progress].call(current_size) if options[:progress] }, open_timeout: options[:timeout], + redirect: false, ) # open-uri will return a StringIO instead of a Tempfile if the filesize # is less than 10 KB, so if it happens we convert it back to Tempfile. if downloaded_file.is_a?(StringIO) @@ -34,10 +35,9 @@ downloaded_file.extend DownloadedFile downloaded_file rescue => error - raise if error.instance_of?(RuntimeError) && error.message !~ /redirection/ raise if error.is_a?(Down::Error) raise Down::NotFound, error.message end def copy_to_tempfile(basename, io)