fog-aws 3.17.0 → 3.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fdc36ea4342e1c08409d77ed825b69f533c288fc0f61508fc9e6a1ce8a3f95b6
4
- data.tar.gz: 85d243645c46cfca8a9e13072cadd8d7e76722260b868f0dd2719c6383c9ebd8
3
+ metadata.gz: bd719ef24c69a6ef93d8b15e4c8304b32a4b762cd6054c4506233c4184197ba9
4
+ data.tar.gz: 556c9dfb1b9cc3f56e5d5fdac16db6484261f56417357de67468f1e7e7c7e5fe
5
5
  SHA512:
6
- metadata.gz: 7612830e760fd0ba381ad962c9df500f4ff05032c8c8d2ebd611329e3147d57151d896dca2c1c6ba3106e3f923a744d3a94b306925fd9bc605b632ec28c63722
7
- data.tar.gz: 380ba1a8c1a2edfbd75c35e05dd595a0656608f939a658131f3305b70e1d957897ee95dde16c9dfe20a2b569b25331a6ae569aea340d4dd12eea185881539e36
6
+ metadata.gz: 2e1b1a7646803fea71d698b0bdca79bae49bdac336536e56fca0ca06a0a9f33dda197e72fde65c4871da40c440618521c66edf91b0aa114444e60badeef39708
7
+ data.tar.gz: 2cc2a96a966d3eff885333fbcd53502505ab64091cc477a0e13a7a0d166749843bdd7afd6a3b67a45c6cdfa9e9ebc09c3e09c84c0e9003d473d8046c5a204423
data/CHANGELOG.md CHANGED
@@ -1,12 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## [v3.18.0](https://github.com/fog/fog-aws/tree/v3.18.0) (2023-02-16)
4
+
5
+ [Full Changelog](https://github.com/fog/fog-aws/compare/v3.17.0...v3.18.0)
6
+
7
+ **Merged pull requests:**
8
+
9
+ - Only compute SSE-C headers when needed in multipart upload [\#669](https://github.com/fog/fog-aws/pull/669) ([stanhu](https://github.com/stanhu))
10
+
3
11
  ## [v3.17.0](https://github.com/fog/fog-aws/tree/v3.17.0) (2023-02-09)
4
12
 
5
13
  [Full Changelog](https://github.com/fog/fog-aws/compare/v3.16.0...v3.17.0)
6
14
 
7
15
  **Merged pull requests:**
8
16
 
9
- - Support disabling of Content-MD5 for FIPS [\#668](https://github.com/fog/fog-aws/pull/668#issuecomment-1424301523) ([stanhu](https://github.com/stanhu))
17
+ - Support disabling of Content-MD5 for FIPS [\#668](https://github.com/fog/fog-aws/pull/668) ([stanhu](https://github.com/stanhu))
10
18
 
11
19
  ## [v3.16.0](https://github.com/fog/fog-aws/tree/v3.16.0) (2023-01-26)
12
20
 
@@ -335,12 +335,12 @@ module Fog
335
335
  body.rewind rescue nil
336
336
  end
337
337
  while (chunk = body.read(multipart_chunk_size)) do
338
- part_upload = service.upload_part(directory.key, key, upload_id, part_tags.size + 1, chunk, part_headers(chunk, options))
338
+ part_upload = service.upload_part(directory.key, key, upload_id, part_tags.size + 1, chunk, part_headers(chunk))
339
339
  part_tags << part_upload.headers["ETag"]
340
340
  end
341
341
 
342
342
  if part_tags.empty? #it is an error to have a multipart upload with no parts
343
- part_upload = service.upload_part(directory.key, key, upload_id, 1, '', part_headers('', options))
343
+ part_upload = service.upload_part(directory.key, key, upload_id, 1, '', part_headers(''))
344
344
  part_tags << part_upload.headers["ETag"]
345
345
  end
346
346
 
@@ -387,11 +387,18 @@ module Fog
387
387
  end
388
388
  end
389
389
 
390
- def part_headers(chunk, options)
390
+ def part_headers(chunk)
391
391
  base_headers = part_checksum_headers(chunk)
392
- encryption_keys = encryption_customer_key_headers.keys
393
- encryption_headers = options.select { |key| encryption_keys.include?(key) }
394
- base_headers.merge(encryption_headers)
392
+
393
+ # Only SSE-C headers needed in the UploadPart request. [1]
394
+ # x-amz-server-side-encryption and
395
+ # x-amz-server-side-encryption-aws-kms-key-id are only needed
396
+ # in the CreateMultipartUpload request. [2]
397
+ # [1] https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html
398
+ # [2] https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html
399
+ base_headers.merge!(encryption_customer_key_headers) if encryption && encryption_key
400
+
401
+ base_headers
395
402
  end
396
403
 
397
404
  def encryption_customer_key_headers
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module AWS
3
- VERSION = "3.17.0"
3
+ VERSION = "3.18.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-aws
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.17.0
4
+ version: 3.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Lane
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-02-09 00:00:00.000000000 Z
12
+ date: 2023-02-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler