We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d043c12 commit ccbe492Copy full SHA for ccbe492
train_portal/ice/videos.rb
@@ -6,6 +6,10 @@
6
require 'open-uri'
7
require 'zip'
8
9
+if OpenSSL::SSL.const_defined?(:OP_IGNORE_UNEXPECTED_EOF)
10
+ OpenSSL::SSL::SSLContext::DEFAULT_PARAMS[:options] |= OpenSSL::SSL::OP_IGNORE_UNEXPECTED_EOF
11
+end
12
+
13
module TrainPortal::Ice
14
module Videos
15
module_function
@@ -188,7 +192,8 @@ def download_mp4decrypt(destination_path)
188
192
zip_path = File.join(tmp_dir, 'bento4.zip')
189
193
190
194
File.open(zip_path, 'wb') do |file|
191
- file.write(URI.open(bento_url).open(open_timeout: READ_TIMEOUT, read_timeout: READ_TIMEOUT).read)
195
+ uri = URI.parse(bento_url).open(open_timeout: READ_TIMEOUT, read_timeout: READ_TIMEOUT)
196
+ file.write(uri.read)
197
end
198
199
Zip::File.open(zip_path) do |zip_file|
0 commit comments