mirror of
https://github.com/moebooru/moebooru
synced 2025-08-30 21:45:13 +00:00
Fixed https downloader.
This commit is contained in:
@@ -34,8 +34,12 @@ module Danbooru
|
|||||||
url.query = Addressable::URI.encode(url.query)
|
url.query = Addressable::URI.encode(url.query)
|
||||||
end
|
end
|
||||||
|
|
||||||
unless url.scheme == 'http'
|
unless url.scheme == 'http' or url.scheme == 'https'
|
||||||
raise SocketError, "URL must be HTTP"
|
raise SocketError, "URL must be HTTP or HTTPS"
|
||||||
|
end
|
||||||
|
|
||||||
|
unless url.port
|
||||||
|
url.port = url.scheme == 'https' ? 443 : 80
|
||||||
end
|
end
|
||||||
|
|
||||||
http = Net::HTTP.new url.host, url.port
|
http = Net::HTTP.new url.host, url.port
|
||||||
|
Reference in New Issue
Block a user