Skip to content

Commit

Permalink
Set SSL for HTTPS connections in RemoteUncap
Browse files Browse the repository at this point in the history
  • Loading branch information
julik committed Jan 4, 2025
1 parent 89951a1 commit 9f86d72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/zip_kit/remote_io.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def tell
# @param range[Range] the HTTP range of data to fetch from remote
# @return [String] the response body of the ranged request
def request_range(range)
http = Net::HTTP.start(@uri.hostname, @uri.port)
http = Net::HTTP.start(@uri.hostname, @uri.port, use_ssl: @uri.scheme == "https")
request = Net::HTTP::Get.new(@uri)
request.range = range
response = http.request(request)
Expand All @@ -91,7 +91,7 @@ def request_range(range)
#
# @return [Integer] the size of the remote resource, parsed either from Content-Length or Content-Range header
def request_object_size
http = Net::HTTP.start(@uri.hostname, @uri.port)
http = Net::HTTP.start(@uri.hostname, @uri.port, use_ssl: @uri.scheme == "https")
request = Net::HTTP::Get.new(@uri)
request.range = 0..0
response = http.request(request)
Expand Down

0 comments on commit 9f86d72

Please sign in to comment.