From f5aa9b0bf62932fa407700540b464fa188575e4c Mon Sep 17 00:00:00 2001 From: Tamer Salama Date: Thu, 17 Mar 2016 00:48:59 -0600 Subject: [PATCH] Work around a potential Ruby OpenURI Issue https://bugs.ruby-lang.org/issues/11268 --- lib/wayback_machine_downloader.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/wayback_machine_downloader.rb b/lib/wayback_machine_downloader.rb index deea556..bd864e0 100644 --- a/lib/wayback_machine_downloader.rb +++ b/lib/wayback_machine_downloader.rb @@ -110,7 +110,7 @@ class WaybackMachineDownloader structure_dir_path dir_path open(file_path, "wb") do |file| begin - open("http://web.archive.org/web/#{file_timestamp}id_/#{file_url}") do |uri| + open("http://web.archive.org/web/#{file_timestamp}id_/#{file_url}", "Accept-Encoding" => "plain") do |uri| file.write(uri.read) end rescue OpenURI::HTTPError => e