aws-sigv4 1.2.0 → 1.2.1

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: bb5dcbbff098d3a214203f2ae9e9232a45a21b172975e54d53760458a3bae292
4
- data.tar.gz: '021178fadb12d304636d9f62f437c1d4771ec73dbd331e035f0d44150cc09bf1'
3
+ metadata.gz: 522eb318a39edd34b0c8cf779ed6cd8c9205f029a839542e6cb7cbc17d8ad05a
4
+ data.tar.gz: 1795295c553af7c4d328f4d1ef0975dbe96b88d51c7ee3965c8570474a1b3a7d
5
5
  SHA512:
6
- metadata.gz: db494770a0cf87af1eabd7ff006b6f0ffa7fda832c9fb584fe5937fda36c7764ad78bd07e3837b5e2b7e32dcb7733278189b0ceb4112d4081f7f9c3df510485f
7
- data.tar.gz: 7e8bccac2be5edba105722f8d2e2fa61c4d8167289e768b28162cb7b66dc5a9a22e3e850fdf5b65af69dc20604bc2a2433732bb4429ffffa2fb0df7271ec3e73
6
+ metadata.gz: ce6b0e0987b50035d9837e4ad779f576a9ffec669c37fb09e128863630e8ecc5d86639ce350bd72a03803593fc21cdce1bc5c2e74fc29bd749e1c25f949dd052
7
+ data.tar.gz: 9bc973d9b286e07773523071b1be61f02797637efb93ab2d5e330abd66f45b4102479adfd979d7f665d7719eacd065c7bf1624ff773f4140bbe1e7cca2caf903
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'aws-sigv4/credentials'
2
4
  require_relative 'aws-sigv4/errors'
3
5
  require_relative 'aws-sigv4/signature'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Aws
2
4
  module Sigv4
3
5
  # Users that wish to configure static credentials can use the
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Aws
2
4
  module Sigv4
3
5
  module Errors
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'uri'
2
4
 
3
5
  module Aws
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Aws
2
4
  module Sigv4
3
5
  class Signature
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'openssl'
2
4
  require 'tempfile'
3
5
  require 'time'
@@ -217,7 +219,7 @@ module Aws
217
219
  content_sha256 ||= sha256_hexdigest(request[:body] || '')
218
220
 
219
221
  sigv4_headers = {}
220
- sigv4_headers['host'] = host(url)
222
+ sigv4_headers['host'] = headers['host'] || host(url)
221
223
  sigv4_headers['x-amz-date'] = datetime
222
224
  sigv4_headers['x-amz-security-token'] = creds.session_token if creds.session_token
223
225
  sigv4_headers['x-amz-content-sha256'] ||= content_sha256 if @apply_checksum_header
@@ -374,7 +376,7 @@ module Aws
374
376
  url = extract_url(options)
375
377
 
376
378
  headers = downcase_headers(options[:headers])
377
- headers['host'] = host(url)
379
+ headers['host'] ||= host(url)
378
380
 
379
381
  datetime = headers['x-amz-date']
380
382
  datetime ||= (options[:time] || Time.now).utc.strftime("%Y%m%dT%H%M%SZ")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sigv4
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-17 00:00:00.000000000 Z
11
+ date: 2020-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-eventstream