opengraph_parser 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/redirect_follower.rb +6 -6
- metadata +3 -3
data/lib/redirect_follower.rb
CHANGED
@@ -19,15 +19,15 @@ class RedirectFollower
|
|
19
19
|
raise TooManyRedirects if redirect_limit < 0
|
20
20
|
|
21
21
|
uri = URI.parse(URI.escape(url))
|
22
|
+
|
23
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
22
24
|
if uri.scheme == 'https'
|
23
|
-
|
24
|
-
|
25
|
-
https.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
26
|
-
self.response = https.request_get(uri.request_uri, @headers)
|
27
|
-
else
|
28
|
-
self.response = Net::HTTP.get_response(uri, @headers)
|
25
|
+
http.use_ssl = true
|
26
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
29
27
|
end
|
30
28
|
|
29
|
+
self.response = http.request_get(uri.request_uri, @headers)
|
30
|
+
|
31
31
|
if response.kind_of?(Net::HTTPRedirection)
|
32
32
|
self.url = redirect_url
|
33
33
|
self.redirect_limit -= 1
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opengraph_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-02-
|
13
|
+
date: 2013-02-21 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: nokogiri
|
@@ -138,7 +138,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
138
138
|
version: '0'
|
139
139
|
segments:
|
140
140
|
- 0
|
141
|
-
hash: -
|
141
|
+
hash: -2567811217494491510
|
142
142
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
143
143
|
none: false
|
144
144
|
requirements:
|