Skip to content

Commit

Permalink
Handle URLs correctly when making requests (preserve port and protocol)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkpr committed May 3, 2018
1 parent ac2ecb3 commit 6d657ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/voog/dtk/filemanager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ def create_asset(asset = nil)
open(asset.filename, 'wb') { |file| file.write(asset.data) }
else
url = URI(asset.public_url)
Net::HTTP.start(url.hostname) do |http|
Net::HTTP.start(url.hostname, url.port, use_ssl: (url.scheme == 'https')) do |http|
resp = http.get(url.path)
open(asset.filename, 'wb') { |file| file.write(resp.body) }
end
Expand Down
2 changes: 1 addition & 1 deletion lib/voog/dtk/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Voog
module Dtk
VERSION = '0.5.6'
VERSION = '0.5.7'
end
end

0 comments on commit 6d657ab

Please sign in to comment.