aws-sdk-core 3.265.0 → 3.266.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 +4 -4
- data/CHANGELOG.md +9 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +21 -7
- data/lib/aws-sdk-signin/client.rb +45 -1
- data/lib/aws-sdk-signin/client_api.rb +26 -0
- data/lib/aws-sdk-signin/endpoints.rb +11 -0
- data/lib/aws-sdk-signin/types.rb +54 -0
- data/lib/aws-sdk-signin.rb +2 -2
- data/lib/aws-sdk-sso/client.rb +1 -1
- data/lib/aws-sdk-sso.rb +1 -1
- data/lib/aws-sdk-ssooidc/client.rb +1 -1
- data/lib/aws-sdk-ssooidc.rb +1 -1
- data/lib/aws-sdk-sts/client.rb +1 -1
- data/lib/aws-sdk-sts.rb +1 -1
- data/lib/seahorse/client/http/request.rb +19 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b607ebd46ddca5510267003bddb3d01f13678586afa588ca5f1c938acf17f8e7
|
|
4
|
+
data.tar.gz: 75be23eb7cf4e5240f14ded9a4bbb83aec2956b12e0b3a3669ab196d883364e1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 923c36586c6f173a39f82e3d4bdc3fb203d69129bea2f7cbe778ee2f716d080edccfec18970b5eab729aa072fc32fefdb727c994834d979873e58e853516ed75
|
|
7
|
+
data.tar.gz: 882d69cfeabd50c7184dd5c3a0511609c7ff9c39e7bcad05ad898b5f7e518b5ee61d9abd72c58b0391a2ea5a75f2c2296d3369e5a5e346c1cb1ba1d793edbf1a
|
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
Unreleased Changes
|
|
2
2
|
------------------
|
|
3
3
|
|
|
4
|
+
3.266.0 (2026-11-09)
|
|
5
|
+
------------------
|
|
6
|
+
|
|
7
|
+
* Feature - Updated Aws::Signin::Client with the latest API changes.
|
|
8
|
+
|
|
9
|
+
* Feature - Adds the CreateBearerToken API, which exchanges your IAM credentials for a bearer token that can be used to access supported AWS services.
|
|
10
|
+
|
|
11
|
+
* Feature - Reduce memory allocations when streaming request bodies with checksum trailers while preserving compatibility with custom IO bodies.
|
|
12
|
+
|
|
4
13
|
3.265.0 (2026-11-06)
|
|
5
14
|
------------------
|
|
6
15
|
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.
|
|
1
|
+
3.266.0
|
|
@@ -335,7 +335,8 @@ module Aws
|
|
|
335
335
|
when 'header'
|
|
336
336
|
apply_request_checksum(context, headers, checksum_properties)
|
|
337
337
|
when 'trailer'
|
|
338
|
-
|
|
338
|
+
buffer_enabled = context.http_request.buffer_supported?
|
|
339
|
+
apply_request_trailer_checksum(context, headers, checksum_properties, buffer_enabled)
|
|
339
340
|
else
|
|
340
341
|
# nothing
|
|
341
342
|
end
|
|
@@ -385,7 +386,7 @@ module Aws
|
|
|
385
386
|
io.rewind
|
|
386
387
|
end
|
|
387
388
|
|
|
388
|
-
def apply_request_trailer_checksum(context, headers, checksum_properties)
|
|
389
|
+
def apply_request_trailer_checksum(context, headers, checksum_properties, buffer_enabled)
|
|
389
390
|
location_name = checksum_properties[:name]
|
|
390
391
|
|
|
391
392
|
# set required headers
|
|
@@ -410,6 +411,7 @@ module Aws
|
|
|
410
411
|
context.http_request.body =
|
|
411
412
|
AwsChunkedTrailerDigestIO.new(
|
|
412
413
|
io: context.http_request.body,
|
|
414
|
+
buffer_enabled: buffer_enabled,
|
|
413
415
|
algorithm: checksum_properties[:algorithm],
|
|
414
416
|
location_name: location_name
|
|
415
417
|
)
|
|
@@ -484,6 +486,7 @@ module Aws
|
|
|
484
486
|
HEX_BASE = 16
|
|
485
487
|
|
|
486
488
|
def initialize(options = {})
|
|
489
|
+
buffer_enabled = options.delete(:buffer_enabled) || false
|
|
487
490
|
@io = options.delete(:io)
|
|
488
491
|
@io.rewind if @io.respond_to?(:rewind)
|
|
489
492
|
@location_name = options.delete(:location_name)
|
|
@@ -492,6 +495,8 @@ module Aws
|
|
|
492
495
|
@chunk_size = Thread.current[:net_http_override_body_stream_chunk] || DEFAULT_TRAILER_CHUNK_SIZE
|
|
493
496
|
@overhead_bytes = calculate_overhead(@chunk_size)
|
|
494
497
|
@base_chunk_size = @chunk_size - @overhead_bytes
|
|
498
|
+
@chunk = ''.b
|
|
499
|
+
@read_chunk = method(buffer_enabled ? :read_chunk_with_buffer : :read_chunk_without_buffer)
|
|
495
500
|
@encoded_buffer = +''
|
|
496
501
|
@eof = false
|
|
497
502
|
end
|
|
@@ -527,8 +532,9 @@ module Aws
|
|
|
527
532
|
|
|
528
533
|
fill_encoded_buffer(length)
|
|
529
534
|
|
|
530
|
-
if length
|
|
531
|
-
output_buffer << @encoded_buffer.
|
|
535
|
+
if length && length < @encoded_buffer.bytesize
|
|
536
|
+
output_buffer << @encoded_buffer.byteslice(0, length)
|
|
537
|
+
@encoded_buffer = @encoded_buffer.byteslice(length, @encoded_buffer.bytesize - length)
|
|
532
538
|
else
|
|
533
539
|
output_buffer << @encoded_buffer
|
|
534
540
|
@encoded_buffer.clear
|
|
@@ -547,16 +553,24 @@ module Aws
|
|
|
547
553
|
chunk_size.to_s(HEX_BASE).size + CHUNK_OVERHEAD
|
|
548
554
|
end
|
|
549
555
|
|
|
556
|
+
def read_chunk_with_buffer
|
|
557
|
+
@io.read(@base_chunk_size, @chunk)
|
|
558
|
+
end
|
|
559
|
+
|
|
560
|
+
def read_chunk_without_buffer
|
|
561
|
+
@io.read(@base_chunk_size)
|
|
562
|
+
end
|
|
563
|
+
|
|
550
564
|
def fill_encoded_buffer(required_length)
|
|
551
565
|
return if required_length && @encoded_buffer.bytesize >= required_length
|
|
552
566
|
|
|
553
567
|
while !@eof && fill_data?(required_length)
|
|
554
|
-
chunk = @
|
|
568
|
+
chunk = @read_chunk.call
|
|
555
569
|
if chunk && !chunk.empty?
|
|
556
570
|
@digest.update(chunk)
|
|
557
|
-
@encoded_buffer <<
|
|
571
|
+
@encoded_buffer << chunk.bytesize.to_s(HEX_BASE) << "\r\n" << chunk << "\r\n"
|
|
558
572
|
else
|
|
559
|
-
@encoded_buffer << "0\r\n
|
|
573
|
+
@encoded_buffer << "0\r\n" << trailer_string << "\r\n\r\n"
|
|
560
574
|
@eof = true
|
|
561
575
|
end
|
|
562
576
|
end
|
|
@@ -481,6 +481,50 @@ module Aws::Signin
|
|
|
481
481
|
|
|
482
482
|
# @!group API Operations
|
|
483
483
|
|
|
484
|
+
# Creates a bearer token that represents your IAM credentials and can be
|
|
485
|
+
# used to access a supported AWS service. By default, the token is valid
|
|
486
|
+
# for 12 hours.
|
|
487
|
+
#
|
|
488
|
+
# @option params [required, String] :grant_type
|
|
489
|
+
# The grant type. Must be "client\_credentials".
|
|
490
|
+
#
|
|
491
|
+
# @option params [required, String] :resource
|
|
492
|
+
# The AWS service the bearer token is for. Example: "ecr.amazonaws.com".
|
|
493
|
+
#
|
|
494
|
+
# @option params [Integer] :duration_seconds
|
|
495
|
+
# The requested token lifetime in seconds, from 300 (5 minutes) up to
|
|
496
|
+
# the maximum allowed for the service, currently 43200 (12 hours). If
|
|
497
|
+
# omitted, the token is valid for 12 hours.
|
|
498
|
+
#
|
|
499
|
+
# @return [Types::CreateBearerTokenResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
500
|
+
#
|
|
501
|
+
# * {Types::CreateBearerTokenResponse#access_token #access_token} => String
|
|
502
|
+
# * {Types::CreateBearerTokenResponse#token_type #token_type} => String
|
|
503
|
+
# * {Types::CreateBearerTokenResponse#expires_in #expires_in} => Integer
|
|
504
|
+
#
|
|
505
|
+
# @example Request syntax with placeholder values
|
|
506
|
+
#
|
|
507
|
+
# resp = client.create_bearer_token({
|
|
508
|
+
# grant_type: "ClientCredentialsGrantType", # required
|
|
509
|
+
# resource: "Resource", # required
|
|
510
|
+
# duration_seconds: 1,
|
|
511
|
+
# })
|
|
512
|
+
#
|
|
513
|
+
# @example Response structure
|
|
514
|
+
#
|
|
515
|
+
# resp.access_token #=> String
|
|
516
|
+
# resp.token_type #=> String
|
|
517
|
+
# resp.expires_in #=> Integer
|
|
518
|
+
#
|
|
519
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/signin-2023-01-01/CreateBearerToken AWS API Documentation
|
|
520
|
+
#
|
|
521
|
+
# @overload create_bearer_token(params = {})
|
|
522
|
+
# @param [Hash] params ({})
|
|
523
|
+
def create_bearer_token(params = {}, options = {})
|
|
524
|
+
req = build_request(:create_bearer_token, params)
|
|
525
|
+
req.send_request(options)
|
|
526
|
+
end
|
|
527
|
+
|
|
484
528
|
# Exchanges an authorization code or refresh token for an OAuth 2.0
|
|
485
529
|
# access token and refresh token.
|
|
486
530
|
#
|
|
@@ -991,7 +1035,7 @@ module Aws::Signin
|
|
|
991
1035
|
tracer: tracer
|
|
992
1036
|
)
|
|
993
1037
|
context[:gem_name] = 'aws-sdk-core'
|
|
994
|
-
context[:gem_version] = '3.
|
|
1038
|
+
context[:gem_version] = '3.266.0'
|
|
995
1039
|
Seahorse::Client::Request.new(handlers, context)
|
|
996
1040
|
end
|
|
997
1041
|
|
|
@@ -18,6 +18,7 @@ module Aws::Signin
|
|
|
18
18
|
AccessToken = Shapes::StructureShape.new(name: 'AccessToken')
|
|
19
19
|
AccountId = Shapes::StringShape.new(name: 'AccountId')
|
|
20
20
|
AuthorizationCode = Shapes::StringShape.new(name: 'AuthorizationCode')
|
|
21
|
+
BearerTokenExpiresIn = Shapes::IntegerShape.new(name: 'BearerTokenExpiresIn')
|
|
21
22
|
BearerTokenType = Shapes::StringShape.new(name: 'BearerTokenType')
|
|
22
23
|
Boolean = Shapes::BooleanShape.new(name: 'Boolean')
|
|
23
24
|
ClientCredentialsGrantType = Shapes::StringShape.new(name: 'ClientCredentialsGrantType')
|
|
@@ -30,6 +31,8 @@ module Aws::Signin
|
|
|
30
31
|
ConditionValues = Shapes::ListShape.new(name: 'ConditionValues')
|
|
31
32
|
ConflictException = Shapes::StructureShape.new(name: 'ConflictException')
|
|
32
33
|
ConsolePermissionMaxResults = Shapes::IntegerShape.new(name: 'ConsolePermissionMaxResults')
|
|
34
|
+
CreateBearerTokenRequest = Shapes::StructureShape.new(name: 'CreateBearerTokenRequest')
|
|
35
|
+
CreateBearerTokenResponse = Shapes::StructureShape.new(name: 'CreateBearerTokenResponse')
|
|
33
36
|
CreateOAuth2TokenRequest = Shapes::StructureShape.new(name: 'CreateOAuth2TokenRequest')
|
|
34
37
|
CreateOAuth2TokenRequestBody = Shapes::StructureShape.new(name: 'CreateOAuth2TokenRequestBody')
|
|
35
38
|
CreateOAuth2TokenResponse = Shapes::StructureShape.new(name: 'CreateOAuth2TokenResponse')
|
|
@@ -94,6 +97,7 @@ module Aws::Signin
|
|
|
94
97
|
SubjectToken = Shapes::StringShape.new(name: 'SubjectToken')
|
|
95
98
|
SubjectTokenType = Shapes::StringShape.new(name: 'SubjectTokenType')
|
|
96
99
|
TargetId = Shapes::StringShape.new(name: 'TargetId')
|
|
100
|
+
TokenDuration = Shapes::IntegerShape.new(name: 'TokenDuration')
|
|
97
101
|
TokenExchangeGrantType = Shapes::StringShape.new(name: 'TokenExchangeGrantType')
|
|
98
102
|
TokenExpiresIn = Shapes::IntegerShape.new(name: 'TokenExpiresIn')
|
|
99
103
|
TokenType = Shapes::StringShape.new(name: 'TokenType')
|
|
@@ -123,6 +127,16 @@ module Aws::Signin
|
|
|
123
127
|
ConflictException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
|
|
124
128
|
ConflictException.struct_class = Types::ConflictException
|
|
125
129
|
|
|
130
|
+
CreateBearerTokenRequest.add_member(:grant_type, Shapes::ShapeRef.new(shape: ClientCredentialsGrantType, required: true, location_name: "grant_type"))
|
|
131
|
+
CreateBearerTokenRequest.add_member(:resource, Shapes::ShapeRef.new(shape: Resource, required: true, location_name: "resource"))
|
|
132
|
+
CreateBearerTokenRequest.add_member(:duration_seconds, Shapes::ShapeRef.new(shape: TokenDuration, location_name: "duration"))
|
|
133
|
+
CreateBearerTokenRequest.struct_class = Types::CreateBearerTokenRequest
|
|
134
|
+
|
|
135
|
+
CreateBearerTokenResponse.add_member(:access_token, Shapes::ShapeRef.new(shape: OAuthAccessToken, required: true, location_name: "access_token"))
|
|
136
|
+
CreateBearerTokenResponse.add_member(:token_type, Shapes::ShapeRef.new(shape: BearerTokenType, required: true, location_name: "token_type"))
|
|
137
|
+
CreateBearerTokenResponse.add_member(:expires_in, Shapes::ShapeRef.new(shape: BearerTokenExpiresIn, required: true, location_name: "expires_in"))
|
|
138
|
+
CreateBearerTokenResponse.struct_class = Types::CreateBearerTokenResponse
|
|
139
|
+
|
|
126
140
|
CreateOAuth2TokenRequest.add_member(:token_input, Shapes::ShapeRef.new(shape: CreateOAuth2TokenRequestBody, required: true, location_name: "tokenInput"))
|
|
127
141
|
CreateOAuth2TokenRequest.struct_class = Types::CreateOAuth2TokenRequest
|
|
128
142
|
CreateOAuth2TokenRequest[:payload] = :token_input
|
|
@@ -326,6 +340,18 @@ module Aws::Signin
|
|
|
326
340
|
"uid" => "signin-2023-01-01",
|
|
327
341
|
}
|
|
328
342
|
|
|
343
|
+
api.add_operation(:create_bearer_token, Seahorse::Model::Operation.new.tap do |o|
|
|
344
|
+
o.name = "CreateBearerToken"
|
|
345
|
+
o.http_method = "POST"
|
|
346
|
+
o.http_request_uri = "/v1/token?x-amz-token-request-type=bearer"
|
|
347
|
+
o.input = Shapes::ShapeRef.new(shape: CreateBearerTokenRequest)
|
|
348
|
+
o.output = Shapes::ShapeRef.new(shape: CreateBearerTokenResponse)
|
|
349
|
+
o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsError)
|
|
350
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
|
351
|
+
o.errors << Shapes::ShapeRef.new(shape: ValidationException)
|
|
352
|
+
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
|
|
353
|
+
end)
|
|
354
|
+
|
|
329
355
|
api.add_operation(:create_o_auth_2_token, Seahorse::Model::Operation.new.tap do |o|
|
|
330
356
|
o.name = "CreateOAuth2Token"
|
|
331
357
|
o.http_method = "POST"
|
|
@@ -12,6 +12,15 @@ module Aws::Signin
|
|
|
12
12
|
# @api private
|
|
13
13
|
module Endpoints
|
|
14
14
|
|
|
15
|
+
class CreateBearerToken
|
|
16
|
+
def self.build(context)
|
|
17
|
+
Aws::Signin::EndpointParameters.create(
|
|
18
|
+
context.config,
|
|
19
|
+
is_o_auth_endpoint: true,
|
|
20
|
+
)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
15
24
|
class CreateOAuth2TokenWithIAM
|
|
16
25
|
def self.build(context)
|
|
17
26
|
Aws::Signin::EndpointParameters.create(
|
|
@@ -114,6 +123,8 @@ module Aws::Signin
|
|
|
114
123
|
|
|
115
124
|
def self.parameters_for_operation(context)
|
|
116
125
|
case context.operation_name
|
|
126
|
+
when :create_bearer_token
|
|
127
|
+
CreateBearerToken.build(context)
|
|
117
128
|
when :create_o_auth_2_token_with_iam
|
|
118
129
|
CreateOAuth2TokenWithIAM.build(context)
|
|
119
130
|
when :create_o_auth_2_token_with_token_exchange
|
data/lib/aws-sdk-signin/types.rb
CHANGED
|
@@ -79,6 +79,60 @@ module Aws::Signin
|
|
|
79
79
|
include Aws::Structure
|
|
80
80
|
end
|
|
81
81
|
|
|
82
|
+
# Input structure for CreateBearerToken operation
|
|
83
|
+
#
|
|
84
|
+
# @!attribute [rw] grant_type
|
|
85
|
+
# The grant type. Must be "client\_credentials".
|
|
86
|
+
# @return [String]
|
|
87
|
+
#
|
|
88
|
+
# @!attribute [rw] resource
|
|
89
|
+
# The AWS service the bearer token is for. Example:
|
|
90
|
+
# "ecr.amazonaws.com".
|
|
91
|
+
# @return [String]
|
|
92
|
+
#
|
|
93
|
+
# @!attribute [rw] duration_seconds
|
|
94
|
+
# The requested token lifetime in seconds, from 300 (5 minutes) up to
|
|
95
|
+
# the maximum allowed for the service, currently 43200 (12 hours). If
|
|
96
|
+
# omitted, the token is valid for 12 hours.
|
|
97
|
+
# @return [Integer]
|
|
98
|
+
#
|
|
99
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/signin-2023-01-01/CreateBearerTokenRequest AWS API Documentation
|
|
100
|
+
#
|
|
101
|
+
class CreateBearerTokenRequest < Struct.new(
|
|
102
|
+
:grant_type,
|
|
103
|
+
:resource,
|
|
104
|
+
:duration_seconds)
|
|
105
|
+
SENSITIVE = []
|
|
106
|
+
include Aws::Structure
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Output structure for CreateBearerToken operation
|
|
110
|
+
#
|
|
111
|
+
# Contains the bearer token, its type, and its lifetime.
|
|
112
|
+
#
|
|
113
|
+
# @!attribute [rw] access_token
|
|
114
|
+
# The bearer token. Present it to the AWS service named in the
|
|
115
|
+
# request.
|
|
116
|
+
# @return [String]
|
|
117
|
+
#
|
|
118
|
+
# @!attribute [rw] token_type
|
|
119
|
+
# The token type. Always "Bearer".
|
|
120
|
+
# @return [String]
|
|
121
|
+
#
|
|
122
|
+
# @!attribute [rw] expires_in
|
|
123
|
+
# Token lifetime in seconds.
|
|
124
|
+
# @return [Integer]
|
|
125
|
+
#
|
|
126
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/signin-2023-01-01/CreateBearerTokenResponse AWS API Documentation
|
|
127
|
+
#
|
|
128
|
+
class CreateBearerTokenResponse < Struct.new(
|
|
129
|
+
:access_token,
|
|
130
|
+
:token_type,
|
|
131
|
+
:expires_in)
|
|
132
|
+
SENSITIVE = [:access_token]
|
|
133
|
+
include Aws::Structure
|
|
134
|
+
end
|
|
135
|
+
|
|
82
136
|
# Input structure for CreateOAuth2Token operation
|
|
83
137
|
#
|
|
84
138
|
# Contains flattened token operation inputs for both authorization code
|
data/lib/aws-sdk-signin.rb
CHANGED
|
@@ -25,7 +25,7 @@ Aws::Plugins::GlobalConfiguration.add_identifier(:signin)
|
|
|
25
25
|
# structure.
|
|
26
26
|
#
|
|
27
27
|
# signin = Aws::Signin::Client.new
|
|
28
|
-
# resp = signin.
|
|
28
|
+
# resp = signin.create_bearer_token(params)
|
|
29
29
|
#
|
|
30
30
|
# See {Client} for more information.
|
|
31
31
|
#
|
|
@@ -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.
|
|
59
|
+
GEM_VERSION = '3.266.0'
|
|
60
60
|
|
|
61
61
|
end
|
|
62
62
|
|
data/lib/aws-sdk-sso/client.rb
CHANGED
data/lib/aws-sdk-sso.rb
CHANGED
data/lib/aws-sdk-ssooidc.rb
CHANGED
data/lib/aws-sdk-sts/client.rb
CHANGED
data/lib/aws-sdk-sts.rb
CHANGED
|
@@ -55,8 +55,16 @@ module Seahorse
|
|
|
55
55
|
contents
|
|
56
56
|
end
|
|
57
57
|
|
|
58
|
+
# @api private
|
|
59
|
+
def buffer_supported?
|
|
60
|
+
return @buffer_enabled unless @buffer_enabled.nil?
|
|
61
|
+
|
|
62
|
+
@buffer_enabled = detect_read_buffer_support
|
|
63
|
+
end
|
|
64
|
+
|
|
58
65
|
# @param [#read, #size, #rewind] io
|
|
59
66
|
def body=(io)
|
|
67
|
+
@buffer_enabled = nil
|
|
60
68
|
@body = case io
|
|
61
69
|
when nil then StringIO.new('')
|
|
62
70
|
when String then StringIO.new(io)
|
|
@@ -64,6 +72,17 @@ module Seahorse
|
|
|
64
72
|
end
|
|
65
73
|
end
|
|
66
74
|
|
|
75
|
+
private
|
|
76
|
+
|
|
77
|
+
# Only probe ArgumentError falls back. Payload errors must propagate.
|
|
78
|
+
def detect_read_buffer_support
|
|
79
|
+
buffer = "\0".b
|
|
80
|
+
@body.read(0, buffer)
|
|
81
|
+
buffer.empty?
|
|
82
|
+
rescue ArgumentError
|
|
83
|
+
false
|
|
84
|
+
end
|
|
85
|
+
|
|
67
86
|
end
|
|
68
87
|
end
|
|
69
88
|
end
|