lib/aws/s3/s3_object.rb in aws-sdk-1.6.4 vs lib/aws/s3/s3_object.rb in aws-sdk-1.6.5
- old
+ new
@@ -10,10 +10,11 @@
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
require 'uri'
+require 'base64'
module AWS
class S3
# Represents an object in S3. Objects live in a bucket and have
@@ -817,16 +818,19 @@
if options[:content_type]
copy_opts[:content_type] = options[:content_type]
copy_opts[:metadata_directive] = "REPLACE"
end
+ if options[:cache_control]
+ copy_opts[:cache_control] = options[:cache_control]
+ copy_opts[:metadata_directive] = "REPLACE"
+ end
+
copy_opts[:acl] = options[:acl] if options[:acl]
copy_opts[:version_id] = options[:version_id] if options[:version_id]
copy_opts[:server_side_encryption] =
options[:server_side_encryption] if
options.key?(:server_side_encryption)
- copy_opts[:cache_control] = options[:cache_control] if
- options[:cache_control]
add_sse_options(copy_opts)
if options[:reduced_redundancy]
copy_opts[:storage_class] = 'REDUCED_REDUNDANCY'
else