aws-sdk-core 2.2.5 → 2.2.6

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.
@@ -0,0 +1,5 @@
1
+ {
2
+ "version": "1.0",
3
+ "examples": {
4
+ }
5
+ }
@@ -1,5 +1,6 @@
1
1
  Aws.add_service(:CloudWatchLogs, {
2
2
  api: "#{Aws::API_DIR}/logs/2014-03-28/api-2.json",
3
3
  docs: "#{Aws::API_DIR}/logs/2014-03-28/docs-2.json",
4
+ examples: "#{Aws::API_DIR}/logs/2014-03-28/examples-1.json",
4
5
  paginators: "#{Aws::API_DIR}/logs/2014-03-28/paginators-1.json",
5
6
  })
@@ -1,5 +1,6 @@
1
1
  Aws.add_service(:DirectConnect, {
2
2
  api: "#{Aws::API_DIR}/directconnect/2012-10-25/api-2.json",
3
3
  docs: "#{Aws::API_DIR}/directconnect/2012-10-25/docs-2.json",
4
+ examples: "#{Aws::API_DIR}/directconnect/2012-10-25/examples-1.json",
4
5
  paginators: "#{Aws::API_DIR}/directconnect/2012-10-25/paginators-1.json",
5
6
  })
@@ -37,7 +37,7 @@ module Aws
37
37
  end
38
38
 
39
39
  def param_value_for_placeholder(placeholder, params)
40
- value = params[param_name(placeholder)]
40
+ value = params[param_name(placeholder)].to_s
41
41
  placeholder.include?('+') ?
42
42
  value.gsub(/[^\/]+/) { |v| escape(v) } :
43
43
  escape(value)
@@ -89,7 +89,12 @@ module Aws
89
89
  req.handlers.remove(Plugins::S3RequestSigner::SigningHandler)
90
90
  req.handlers.remove(Seahorse::Client::Plugins::ContentLength::Handler)
91
91
  req.handle(step: :send) do |context|
92
- context.http_request.endpoint.scheme = scheme
92
+ if scheme != context.http_request.endpoint.scheme
93
+ endpoint = context.http_request.endpoint.dup
94
+ endpoint.scheme = scheme
95
+ endpoint.port = (scheme == 'http' ? 80 : 443)
96
+ context.http_request.endpoint = URI.parse(endpoint.to_s)
97
+ end
93
98
  signer = Signers::V4.new(
94
99
  context.config.credentials, 's3',
95
100
  context.config.region
@@ -5,6 +5,26 @@ module Aws
5
5
  module Signers
6
6
  class V4
7
7
 
8
+ BLACKLIST_HEADERS = [
9
+ 'cache-control',
10
+ 'content-length',
11
+ 'expect',
12
+ 'max-forwards',
13
+ 'pragma',
14
+ 'te',
15
+ 'if-match',
16
+ 'if-none-match',
17
+ 'if-modified-since',
18
+ 'if-unmodified-since',
19
+ 'if-range',
20
+ 'accept',
21
+ 'authorization',
22
+ 'proxy-authorization',
23
+ 'from',
24
+ 'referer',
25
+ 'user-agent'
26
+ ]
27
+
8
28
  def self.sign(context)
9
29
  new(
10
30
  context.config.credentials,
@@ -162,7 +182,9 @@ module Aws
162
182
  def signed_headers(request)
163
183
  request.headers.keys.inject([]) do |signed_headers, header_key|
164
184
  header_key = header_key.downcase
165
- signed_headers << header_key unless header_key == 'authorization'
185
+ unless BLACKLIST_HEADERS.include?(header_key)
186
+ signed_headers << header_key
187
+ end
166
188
  signed_headers
167
189
  end.sort.join(';')
168
190
  end
@@ -171,7 +193,7 @@ module Aws
171
193
  headers = []
172
194
  request.headers.each_pair do |k,v|
173
195
  k = k.downcase
174
- headers << [k,v] unless k == 'authorization'
196
+ headers << [k,v] unless BLACKLIST_HEADERS.include?(k)
175
197
  end
176
198
  headers = headers.sort_by(&:first)
177
199
  headers.map{|k,v| "#{k}:#{canonical_header_value(v.to_s)}" }.join("\n")
@@ -1,3 +1,3 @@
1
1
  module Aws
2
- VERSION = '2.2.5'
2
+ VERSION = '2.2.6'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.5
4
+ version: 2.2.6
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: 2015-12-09 00:00:00.000000000 Z
11
+ date: 2015-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jmespath
@@ -67,6 +67,7 @@ files:
67
67
  - apis/devicefarm/2015-06-23/examples-1.json
68
68
  - apis/devicefarm/2015-06-23/paginators-1.json
69
69
  - apis/directconnect/2012-10-25/api-2.json
70
+ - apis/directconnect/2012-10-25/examples-1.json
70
71
  - apis/directconnect/2012-10-25/paginators-1.json
71
72
  - apis/ds/2015-04-16/api-2.json
72
73
  - apis/ds/2015-04-16/examples-1.json
@@ -129,6 +130,7 @@ files:
129
130
  - apis/lambda/2015-03-31/api-2.json
130
131
  - apis/lambda/2015-03-31/paginators-1.json
131
132
  - apis/logs/2014-03-28/api-2.json
133
+ - apis/logs/2014-03-28/examples-1.json
132
134
  - apis/logs/2014-03-28/paginators-1.json
133
135
  - apis/machinelearning/2014-12-12/api-2.json
134
136
  - apis/machinelearning/2014-12-12/paginators-1.json
@@ -435,7 +437,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
435
437
  version: '0'
436
438
  requirements: []
437
439
  rubyforge_project:
438
- rubygems_version: 2.4.5
440
+ rubygems_version: 2.2.2
439
441
  signing_key:
440
442
  specification_version: 4
441
443
  summary: AWS SDK for Ruby - Core