Skip to content

Commit b9b7a28

Browse files
committed
Merge pull request #83 from tdiary/https-flickr
Use https on flickr api
2 parents b526640 + 60107f0 commit b9b7a28

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

plugin/flickr.rb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
# show photo image on Flickr.com
23
#
34
# usage:
@@ -18,7 +19,7 @@
1819
# Copyright (c) MATSUOKA Kohei <http://www.machu.jp/>
1920
# Distributed under the GPL
2021
#
21-
require 'net/http'
22+
require 'net/https'
2223
require 'digest/md5'
2324
require 'rexml/document'
2425

@@ -180,8 +181,10 @@ def initialize(api_key, secret = nil)
180181

181182
def open
182183
Net::HTTP.version_1_2
183-
Net::HTTP.start('www.flickr.com') {|http|
184-
response = http.get(query)
184+
https = Net::HTTP.new('www.flickr.com', 443)
185+
https.use_ssl = true
186+
https.start {
187+
response = https.get(query)
185188
response.body
186189
}
187190
end

0 commit comments

Comments
 (0)