зеркало из https://github.com/microsoft/fog.git
default to non-persistent connections
This commit is contained in:
Родитель
030fceba77
Коммит
9526938650
|
@ -137,7 +137,6 @@ module Fog
|
|||
@host = options[:host] || 'ec2.amazonaws.com'
|
||||
@port = options[:port] || 443
|
||||
@scheme = options[:scheme] || 'https'
|
||||
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}")
|
||||
end
|
||||
|
||||
private
|
||||
|
@ -152,6 +151,7 @@ module Fog
|
|||
end
|
||||
|
||||
def request(params, parser)
|
||||
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}")
|
||||
params.merge!({
|
||||
'AWSAccessKeyId' => @aws_access_key_id,
|
||||
'SignatureMethod' => 'HmacSHA256',
|
||||
|
|
|
@ -69,7 +69,6 @@ module Fog
|
|||
@host = options[:host] || 's3.amazonaws.com'
|
||||
@port = options[:port] || 443
|
||||
@scheme = options[:scheme] || 'https'
|
||||
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}")
|
||||
end
|
||||
|
||||
private
|
||||
|
@ -96,6 +95,7 @@ module Fog
|
|||
end
|
||||
|
||||
def request(params)
|
||||
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}")
|
||||
params[:headers]['Date'] = Time.now.utc.strftime("%a, %d %b %Y %H:%M:%S +0000")
|
||||
params[:headers]['Authorization'] = "AWS #{@aws_access_key_id}:#{signature(params)}"
|
||||
|
||||
|
|
|
@ -58,7 +58,6 @@ module Fog
|
|||
@nil_string = options[:nil_string]|| 'nil'
|
||||
@port = options[:port] || 443
|
||||
@scheme = options[:scheme] || 'https'
|
||||
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}")
|
||||
end
|
||||
|
||||
private
|
||||
|
@ -117,6 +116,7 @@ module Fog
|
|||
end
|
||||
|
||||
def request(params, parser)
|
||||
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}")
|
||||
params.merge!({
|
||||
'AWSAccessKeyId' => @aws_access_key_id,
|
||||
'SignatureMethod' => 'HmacSHA256',
|
||||
|
|
|
@ -36,10 +36,10 @@ module Fog
|
|||
@host = options[:host] || "api.slicehost.com"
|
||||
@port = options[:port] || 443
|
||||
@scheme = options[:scheme] || 'https'
|
||||
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}")
|
||||
end
|
||||
|
||||
def request(params)
|
||||
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}")
|
||||
headers = {
|
||||
'Authorization' => "Basic #{Base64.encode64(@password).gsub("\n",'')}"
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче