swift_client 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/swift_client/version.rb +1 -1
- data/lib/swift_client.rb +2 -2
- metadata +1 -1
data/lib/swift_client/version.rb
CHANGED
data/lib/swift_client.rb
CHANGED
@@ -126,11 +126,11 @@ class SwiftClient
|
|
126
126
|
raise(TempUrlKeyMissing) unless options[:temp_url_key]
|
127
127
|
|
128
128
|
expires = (Time.now + (options[:expires_in] || 3600).to_i).to_i
|
129
|
-
path = "/#{container}/#{object}"
|
129
|
+
path = URI.parse("#{storage_url}/#{container}/#{object}").path
|
130
130
|
|
131
131
|
signature = OpenSSL::HMAC.hexdigest("sha1", options[:temp_url_key], "GET\n#{expires}\n#{path}")
|
132
132
|
|
133
|
-
"#{storage_url}
|
133
|
+
"#{storage_url}/#{container}/#{object}?temp_url_sig=#{signature}&temp_url_expires=#{expires}"
|
134
134
|
end
|
135
135
|
|
136
136
|
private
|