aws-sdk-core 3.267.0 → 3.268.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: 14d69a27c6e9ab4d821838bda1ea44d24fbfeef46e957a4f635da7f252308370
4
- data.tar.gz: f94300ec6c2781db55bf7acc7f67307ff9f5a25935e659760fcfa6a00182e3f0
3
+ metadata.gz: 2546cab2f4448950c170b70e06f207e53ce73e6b4aa565876dd46955accc2ee8
4
+ data.tar.gz: 4332cc8dd04f55b96e0bbc41ea6d12368f8d1f88bf4e63ccbb8bf325abb6c8fa
5
5
  SHA512:
6
- metadata.gz: c982cee56307d55c6ff1b23692e7f63ffd4f6898a131c641e98aaab0a896ca712fc1b45380618eb8669cfae2a2b5a5d9c1fb878acfbc951efd7a663318d6ce0c
7
- data.tar.gz: bf509f3108e92cfe72fd05851cb23dbdd0506cd1256eb7cc001b494debeaa0e1d892be44f41abcb3cc8eed05ca795ba4ae445ae021a50fd47282044e20a661d9
6
+ metadata.gz: 7d04b9117b7230c735dfc7f22fb219f9c1267fbeb1e816cc590b2b61758a0579b80253d065494aaa840f1428aed54ab763d16a3f5a20d8167a9e7a14e2433821
7
+ data.tar.gz: fcab3d8beb1c93f7c1aa838f6180ec9e2e1f71d5199213b665c7ceb61766b2e98833e1904c960fc0d6aa8bef7c36feced29f7f4d05a5bda26b0c6a1197396822
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 3.268.0 (2026-11-11)
5
+ ------------------
6
+
7
+ * Feature - Reuse read buffers to reduce allocations when calculating request checksums sent in headers.
8
+
4
9
  3.267.0 (2026-11-10)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.267.0
1
+ 3.268.0
@@ -331,14 +331,15 @@ module Aws
331
331
  headers[algorithm_header] = checksum_properties[:algorithm]
332
332
  end
333
333
 
334
+ return unless %w[header trailer].include?(checksum_properties[:in])
335
+
336
+ body = context.http_request.body
337
+ buffer_enabled = context.http_request.buffer_supported? if body.respond_to?(:read)
334
338
  case checksum_properties[:in]
335
339
  when 'header'
336
- apply_request_checksum(context, headers, checksum_properties)
340
+ apply_request_checksum(context, headers, checksum_properties, buffer_enabled)
337
341
  when 'trailer'
338
- buffer_enabled = context.http_request.buffer_supported?
339
342
  apply_request_trailer_checksum(context, headers, checksum_properties, buffer_enabled)
340
- else
341
- # nothing
342
343
  end
343
344
  end
344
345
 
@@ -356,19 +357,20 @@ module Aws
356
357
  context[:skip_trailer_checksums]
357
358
  end
358
359
 
359
- def apply_request_checksum(context, headers, checksum_properties)
360
+ def apply_request_checksum(context, headers, checksum_properties, buffer_enabled)
360
361
  header_name = checksum_properties[:name]
361
362
  headers[header_name] = calculate_checksum(
362
363
  checksum_properties[:algorithm],
363
- context.http_request.body
364
+ context.http_request.body,
365
+ buffer_enabled
364
366
  )
365
367
  end
366
368
 
367
- def calculate_checksum(algorithm, body)
369
+ def calculate_checksum(algorithm, body, buffer_enabled)
368
370
  digest = ChecksumAlgorithm.digest_for_algorithm(algorithm)
369
371
  if body.respond_to?(:read)
370
372
  body.rewind
371
- update_in_chunks(digest, body)
373
+ update_in_chunks(digest, body, buffer_enabled)
372
374
  body.rewind
373
375
  else
374
376
  digest.update(body)
@@ -376,14 +378,26 @@ module Aws
376
378
  digest.base64digest
377
379
  end
378
380
 
379
- def update_in_chunks(digest, io)
380
- loop do
381
- chunk = io.read(CHECKSUM_CHUNK_SIZE)
382
- break unless chunk
381
+ def update_in_chunks(digest, io, buffer_enabled)
382
+ if buffer_enabled
383
+ update_in_chunks_with_buffer(digest, io)
384
+ else
385
+ update_in_chunks_without_buffer(digest, io)
386
+ end
387
+ io.rewind
388
+ end
383
389
 
390
+ def update_in_chunks_with_buffer(digest, io)
391
+ buffer = ''.b
392
+ while (chunk = io.read(CHECKSUM_CHUNK_SIZE, buffer))
393
+ digest.update(chunk)
394
+ end
395
+ end
396
+
397
+ def update_in_chunks_without_buffer(digest, io)
398
+ while (chunk = io.read(CHECKSUM_CHUNK_SIZE))
384
399
  digest.update(chunk)
385
400
  end
386
- io.rewind
387
401
  end
388
402
 
389
403
  def apply_request_trailer_checksum(context, headers, checksum_properties, buffer_enabled)
@@ -1036,7 +1036,7 @@ module Aws::Signin
1036
1036
  tracer: tracer
1037
1037
  )
1038
1038
  context[:gem_name] = 'aws-sdk-core'
1039
- context[:gem_version] = '3.267.0'
1039
+ context[:gem_version] = '3.268.0'
1040
1040
  Seahorse::Client::Request.new(handlers, context)
1041
1041
  end
1042
1042
 
@@ -56,7 +56,7 @@ module Aws::Signin
56
56
  autoload :EndpointProvider, 'aws-sdk-signin/endpoint_provider'
57
57
  autoload :Endpoints, 'aws-sdk-signin/endpoints'
58
58
 
59
- GEM_VERSION = '3.267.0'
59
+ GEM_VERSION = '3.268.0'
60
60
 
61
61
  end
62
62
 
@@ -704,7 +704,7 @@ module Aws::SSO
704
704
  tracer: tracer
705
705
  )
706
706
  context[:gem_name] = 'aws-sdk-core'
707
- context[:gem_version] = '3.267.0'
707
+ context[:gem_version] = '3.268.0'
708
708
  Seahorse::Client::Request.new(handlers, context)
709
709
  end
710
710
 
data/lib/aws-sdk-sso.rb CHANGED
@@ -56,7 +56,7 @@ module Aws::SSO
56
56
  autoload :EndpointProvider, 'aws-sdk-sso/endpoint_provider'
57
57
  autoload :Endpoints, 'aws-sdk-sso/endpoints'
58
58
 
59
- GEM_VERSION = '3.267.0'
59
+ GEM_VERSION = '3.268.0'
60
60
 
61
61
  end
62
62
 
@@ -1087,7 +1087,7 @@ module Aws::SSOOIDC
1087
1087
  tracer: tracer
1088
1088
  )
1089
1089
  context[:gem_name] = 'aws-sdk-core'
1090
- context[:gem_version] = '3.267.0'
1090
+ context[:gem_version] = '3.268.0'
1091
1091
  Seahorse::Client::Request.new(handlers, context)
1092
1092
  end
1093
1093
 
@@ -56,7 +56,7 @@ module Aws::SSOOIDC
56
56
  autoload :EndpointProvider, 'aws-sdk-ssooidc/endpoint_provider'
57
57
  autoload :Endpoints, 'aws-sdk-ssooidc/endpoints'
58
58
 
59
- GEM_VERSION = '3.267.0'
59
+ GEM_VERSION = '3.268.0'
60
60
 
61
61
  end
62
62
 
@@ -2808,7 +2808,7 @@ module Aws::STS
2808
2808
  tracer: tracer
2809
2809
  )
2810
2810
  context[:gem_name] = 'aws-sdk-core'
2811
- context[:gem_version] = '3.267.0'
2811
+ context[:gem_version] = '3.268.0'
2812
2812
  Seahorse::Client::Request.new(handlers, context)
2813
2813
  end
2814
2814
 
data/lib/aws-sdk-sts.rb CHANGED
@@ -56,7 +56,7 @@ module Aws::STS
56
56
  autoload :EndpointProvider, 'aws-sdk-sts/endpoint_provider'
57
57
  autoload :Endpoints, 'aws-sdk-sts/endpoints'
58
58
 
59
- GEM_VERSION = '3.267.0'
59
+ GEM_VERSION = '3.268.0'
60
60
 
61
61
  end
62
62
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.267.0
4
+ version: 3.268.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services