apk_downloader 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/apk_downloader/api.rb +8 -4
- data/lib/apk_downloader/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1639227456509769eff2009236f6065a711324ea
|
4
|
+
data.tar.gz: c1523b22fdb1eb872c9fe8995d305210aecc61bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cde067a666190525a174176fc165d6dd78f801323d898f1b192ebee57c71811528fc3fbb7853e7e639ed31aabe79059cad8855a6b032005d759d590a220ebdf6
|
7
|
+
data.tar.gz: 5661631707617afc358e8682d8f6fc0bd0840e8863bce3417992504f9a5dde6ae7c1e2ce4217d164dcc7e102146a8b8051cc98924ead26347bf1e48c68e27c5f
|
data/lib/apk_downloader/api.rb
CHANGED
@@ -36,8 +36,9 @@ module ApkDownloader
|
|
36
36
|
|
37
37
|
login_http = Net::HTTP.new LoginUri.host, LoginUri.port
|
38
38
|
login_http.use_ssl = true
|
39
|
+
login_http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
39
40
|
|
40
|
-
post = Net::HTTP::Post.new LoginUri
|
41
|
+
post = Net::HTTP::Post.new LoginUri.to_s
|
41
42
|
post.set_form_data params
|
42
43
|
post["Accept-Encoding"] = ""
|
43
44
|
|
@@ -80,7 +81,9 @@ module ApkDownloader
|
|
80
81
|
raise ArgumentError, 'HTTP redirect too deep' if tries == 0
|
81
82
|
|
82
83
|
http = Net::HTTP.new url.host, url.port
|
83
|
-
|
84
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
85
|
+
|
86
|
+
req = Net::HTTP::Get.new url.to_s
|
84
87
|
req['Accept-Encoding'] = ''
|
85
88
|
req['User-Agent'] = 'AndroidDownloadManager/4.1.1 (Linux; U; Android 4.1.1; Nexus S Build/JRO03E)'
|
86
89
|
req['Cookie'] = [cookie.name, cookie.value].join('=')
|
@@ -101,6 +104,7 @@ module ApkDownloader
|
|
101
104
|
if @http.nil?
|
102
105
|
@http = Net::HTTP.new GoogleApiUri.host, GoogleApiUri.port
|
103
106
|
@http.use_ssl = true
|
107
|
+
@http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
104
108
|
end
|
105
109
|
|
106
110
|
api_headers = {
|
@@ -125,9 +129,9 @@ module ApkDownloader
|
|
125
129
|
|
126
130
|
req = if type == :get
|
127
131
|
uri.query = URI.encode_www_form data
|
128
|
-
Net::HTTP::Get.new uri
|
132
|
+
Net::HTTP::Get.new uri.to_s
|
129
133
|
else
|
130
|
-
post = Net::HTTP::Post.new uri
|
134
|
+
post = Net::HTTP::Post.new uri.to_s
|
131
135
|
post.tap { |p| p.set_form_data data }
|
132
136
|
end
|
133
137
|
|