1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[aws] include port in host to sign

bumps excon to version that includes port in host by default
closes #122
This commit is contained in:
geemus 2010-12-23 13:54:02 -08:00
parent a641545902
commit 1682dd2448
6 changed files with 6 additions and 2 deletions

View file

@ -43,7 +43,7 @@ Gem::Specification.new do |s|
## List your runtime dependencies here. Runtime dependencies are those
## that are needed for an end user to actually USE your code.
s.add_dependency('builder')
s.add_dependency('excon', '>=0.3.3')
s.add_dependency('excon', '>=0.3.6')
s.add_dependency('formatador', '>=0.0.16')
s.add_dependency('json')
s.add_dependency('mime-types')

View file

@ -58,7 +58,7 @@ module Fog
body << "#{key}=#{CGI.escape(value.to_s).gsub(/\+/, '%20')}&"
end
end
string_to_sign = "POST\n#{options[:host]}\n#{options[:path]}\n" << body.chop
string_to_sign = "POST\n#{options[:host]}:#{options[:port]}\n#{options[:path]}\n" << body.chop
signed_string = options[:hmac].sign(string_to_sign)
body << "Signature=#{CGI.escape(Base64.encode64(signed_string).chomp!).gsub(/\+/, '%20')}"

View file

@ -205,6 +205,7 @@ module Fog
:hmac => @hmac,
:host => @host,
:path => @path,
:port => @port,
:version => '2010-08-31'
}
)

View file

@ -82,6 +82,7 @@ module Fog
:hmac => @hmac,
:host => @host,
:path => @path,
:port => @port,
:version => '2009-11-25'
}
)

View file

@ -81,6 +81,7 @@ module Fog
:hmac => @hmac,
:host => @host,
:path => @path,
:port => @port,
:version => '2010-05-08'
}
)

View file

@ -140,6 +140,7 @@ module Fog
:hmac => @hmac,
:host => @host,
:path => @path,
:port => @port,
:version => '2009-04-15'
}
)