From 9968d4c160350765aeb6919f45f3ce7b5a7233d3 Mon Sep 17 00:00:00 2001 From: Frederick Cheung Date: Sun, 14 Oct 2012 22:12:46 +0100 Subject: [PATCH] [AWS|Glacier] Fix description header not being passed through Fog.escape --- lib/fog/aws/requests/glacier/create_archive.rb | 2 +- lib/fog/aws/requests/glacier/initiate_multipart_upload.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/fog/aws/requests/glacier/create_archive.rb b/lib/fog/aws/requests/glacier/create_archive.rb index f8524df68..92bd62760 100644 --- a/lib/fog/aws/requests/glacier/create_archive.rb +++ b/lib/fog/aws/requests/glacier/create_archive.rb @@ -26,7 +26,7 @@ module Fog 'x-amz-content-sha256' => Digest::SHA256.hexdigest(body), 'x-amz-sha256-tree-hash' => Fog::AWS::Glacier::TreeHash.digest(body) } - headers['x-amz-archive-description'] = options['description'] if options['description'] + headers['x-amz-archive-description'] = Fog::AWS.escape(options['description']) if options['description'] request( :expects => 201, diff --git a/lib/fog/aws/requests/glacier/initiate_multipart_upload.rb b/lib/fog/aws/requests/glacier/initiate_multipart_upload.rb index 7c85b0288..e6cd207e6 100644 --- a/lib/fog/aws/requests/glacier/initiate_multipart_upload.rb +++ b/lib/fog/aws/requests/glacier/initiate_multipart_upload.rb @@ -23,7 +23,7 @@ module Fog path = "/#{account_id}/vaults/#{Fog::AWS.escape(name)}/multipart-uploads" headers = {'x-amz-part-size' => part_size.to_s} - headers['x-amz-archive-description'] = options['description'] if options['description'] + headers['x-amz-archive-description'] = Fog::AWS.escape(options['description']) if options['description'] request( :expects => 201, :headers => headers,