blackstack_commons 1.1.20 → 1.1.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/functions.rb +3 -2
- 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: 33db41aa5cfe363ecbe0e717e953177118b5d809
|
4
|
+
data.tar.gz: e182e9b8d8b744fe74101346cdbac4a6f4c49c9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: addc2c6437dceab39acca80eb24b9694d4c83d6d5ccd37b6a30843cec5b3b95f01a4d281f32d04003e0d77c99924de448b28ce728dc7999edecf8c92714fe3f1
|
7
|
+
data.tar.gz: b46fa3ce44d53e01d43d9df23ed5d3c4e2e8e49bfa008fbaf7f52661b675ccc7162ab70f59d3f852ae43aed4649c5d57379768df4ed03d1bbe47feb5ce5a8a20
|
data/lib/functions.rb
CHANGED
@@ -506,7 +506,7 @@ module BlackStack
|
|
506
506
|
# ssl_verify_mode: you can disabele SSL verification here.
|
507
507
|
# max_channels: this method use lockfiles to prevent an excesive number of API calls from each datacenter. There is not allowed more simultaneous calls than max_channels.
|
508
508
|
# TODO: setup max_simultaneus_calls in the configurtion file.
|
509
|
-
def self.call_post(url, params = {}, ssl_verify_mode=BlackStack::Netting::DEFAULT_SSL_VERIFY_MODE, use_lockfile=true)
|
509
|
+
def self.call_post(url, params = {}, ssl_verify_mode=BlackStack::Netting::DEFAULT_SSL_VERIFY_MODE, use_lockfile=true, allow_redirection=true)
|
510
510
|
# build the lockfile name
|
511
511
|
puts ''
|
512
512
|
puts "call_post.url:#{url}:."
|
@@ -532,7 +532,8 @@ puts "call_post.url.2:."
|
|
532
532
|
res = http.request req
|
533
533
|
case res
|
534
534
|
when Net::HTTPSuccess then res
|
535
|
-
when Net::HTTPRedirection then
|
535
|
+
when Net::HTTPRedirection then
|
536
|
+
BlackStack::Netting::call_post(URI(res['location']), params, BlackStack::Netting::DEFAULT_SSL_VERIFY_MODE, false, false) if allow_redirection
|
536
537
|
else
|
537
538
|
res.error!
|
538
539
|
end
|