default to non-persistent connections

This commit is contained in:
Wesley Beary 2010-01-27 20:22:22 -08:00
parent 030fceba77
commit 9526938650
4 changed files with 4 additions and 4 deletions

View File

@ -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',

View File

@ -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)}"

View File

@ -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',

View File

@ -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",'')}"
}