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

fix response-cache-control type for AWS signed urls

This commit is contained in:
John Nishinaga 2012-06-14 00:13:56 -04:00
parent 5b808d9cf8
commit f0034d25e4
2 changed files with 23 additions and 1 deletions

View file

@ -331,7 +331,7 @@ DATA
partNumber
policy
requestPayment
reponse-cache-control
response-cache-control
response-content-disposition
response-content-encoding
response-content-language

View file

@ -0,0 +1,22 @@
# encoding: utf-8
Shindo.tests('AWS | url') do
@expires = DateTime.parse('2013-01-01T00:00:00Z').to_time.utc.to_i
@storage = Fog::Storage.new(
provider: 'AWS',
aws_access_key_id: '123',
aws_secret_access_key: 'abc',
region: 'us-east-1'
)
@file = @storage.directories.new(key: 'fognonbucket').files.new(key: 'test.txt')
tests('#url w/ response-cache-control').returns(
'https://fognonbucket.s3.amazonaws.com/test.txt?response-cache-control=No-cache&AWSAccessKeyId=123&Signature=tajHIhKHAdFYsigmzybCpaq8N0Q%3D&Expires=1356998400'
) do
@file.url(@expires, query: { 'response-cache-control' => 'No-cache' })
end
end