mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
default to non-persistent connections
This commit is contained in:
parent
030fceba77
commit
9526938650
4 changed files with 4 additions and 4 deletions
|
@ -137,7 +137,6 @@ module Fog
|
||||||
@host = options[:host] || 'ec2.amazonaws.com'
|
@host = options[:host] || 'ec2.amazonaws.com'
|
||||||
@port = options[:port] || 443
|
@port = options[:port] || 443
|
||||||
@scheme = options[:scheme] || 'https'
|
@scheme = options[:scheme] || 'https'
|
||||||
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
@ -152,6 +151,7 @@ module Fog
|
||||||
end
|
end
|
||||||
|
|
||||||
def request(params, parser)
|
def request(params, parser)
|
||||||
|
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}")
|
||||||
params.merge!({
|
params.merge!({
|
||||||
'AWSAccessKeyId' => @aws_access_key_id,
|
'AWSAccessKeyId' => @aws_access_key_id,
|
||||||
'SignatureMethod' => 'HmacSHA256',
|
'SignatureMethod' => 'HmacSHA256',
|
||||||
|
|
|
@ -69,7 +69,6 @@ module Fog
|
||||||
@host = options[:host] || 's3.amazonaws.com'
|
@host = options[:host] || 's3.amazonaws.com'
|
||||||
@port = options[:port] || 443
|
@port = options[:port] || 443
|
||||||
@scheme = options[:scheme] || 'https'
|
@scheme = options[:scheme] || 'https'
|
||||||
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
@ -96,6 +95,7 @@ module Fog
|
||||||
end
|
end
|
||||||
|
|
||||||
def request(params)
|
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]['Date'] = Time.now.utc.strftime("%a, %d %b %Y %H:%M:%S +0000")
|
||||||
params[:headers]['Authorization'] = "AWS #{@aws_access_key_id}:#{signature(params)}"
|
params[:headers]['Authorization'] = "AWS #{@aws_access_key_id}:#{signature(params)}"
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,6 @@ module Fog
|
||||||
@nil_string = options[:nil_string]|| 'nil'
|
@nil_string = options[:nil_string]|| 'nil'
|
||||||
@port = options[:port] || 443
|
@port = options[:port] || 443
|
||||||
@scheme = options[:scheme] || 'https'
|
@scheme = options[:scheme] || 'https'
|
||||||
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
@ -117,6 +116,7 @@ module Fog
|
||||||
end
|
end
|
||||||
|
|
||||||
def request(params, parser)
|
def request(params, parser)
|
||||||
|
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}")
|
||||||
params.merge!({
|
params.merge!({
|
||||||
'AWSAccessKeyId' => @aws_access_key_id,
|
'AWSAccessKeyId' => @aws_access_key_id,
|
||||||
'SignatureMethod' => 'HmacSHA256',
|
'SignatureMethod' => 'HmacSHA256',
|
||||||
|
|
|
@ -36,10 +36,10 @@ module Fog
|
||||||
@host = options[:host] || "api.slicehost.com"
|
@host = options[:host] || "api.slicehost.com"
|
||||||
@port = options[:port] || 443
|
@port = options[:port] || 443
|
||||||
@scheme = options[:scheme] || 'https'
|
@scheme = options[:scheme] || 'https'
|
||||||
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def request(params)
|
def request(params)
|
||||||
|
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}")
|
||||||
headers = {
|
headers = {
|
||||||
'Authorization' => "Basic #{Base64.encode64(@password).gsub("\n",'')}"
|
'Authorization' => "Basic #{Base64.encode64(@password).gsub("\n",'')}"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue