aws-sigv4 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws-sigv4.rb +2 -0
- data/lib/aws-sigv4/credentials.rb +2 -0
- data/lib/aws-sigv4/errors.rb +2 -0
- data/lib/aws-sigv4/request.rb +2 -0
- data/lib/aws-sigv4/signature.rb +2 -0
- data/lib/aws-sigv4/signer.rb +4 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 522eb318a39edd34b0c8cf779ed6cd8c9205f029a839542e6cb7cbc17d8ad05a
|
4
|
+
data.tar.gz: 1795295c553af7c4d328f4d1ef0975dbe96b88d51c7ee3965c8570474a1b3a7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce6b0e0987b50035d9837e4ad779f576a9ffec669c37fb09e128863630e8ecc5d86639ce350bd72a03803593fc21cdce1bc5c2e74fc29bd749e1c25f949dd052
|
7
|
+
data.tar.gz: 9bc973d9b286e07773523071b1be61f02797637efb93ab2d5e330abd66f45b4102479adfd979d7f665d7719eacd065c7bf1624ff773f4140bbe1e7cca2caf903
|
data/lib/aws-sigv4.rb
CHANGED
data/lib/aws-sigv4/errors.rb
CHANGED
data/lib/aws-sigv4/request.rb
CHANGED
data/lib/aws-sigv4/signature.rb
CHANGED
data/lib/aws-sigv4/signer.rb
CHANGED
@@ -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']
|
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.
|
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-
|
11
|
+
date: 2020-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-eventstream
|