diff --git a/service/amplifyuibuilder/go.mod b/service/amplifyuibuilder/go.mod index d21ac13b4ba..d8df7d44530 100644 --- a/service/amplifyuibuilder/go.mod +++ b/service/amplifyuibuilder/go.mod @@ -6,7 +6,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.16.5 github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.12 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.6 - github.com/aws/smithy-go v1.11.3 + github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 ) replace github.com/aws/aws-sdk-go-v2 => ../../ diff --git a/service/amplifyuibuilder/go.sum b/service/amplifyuibuilder/go.sum index 86cce5bcbcc..3983dc04087 100644 --- a/service/amplifyuibuilder/go.sum +++ b/service/amplifyuibuilder/go.sum @@ -1,5 +1,5 @@ -github.com/aws/smithy-go v1.11.3 h1:DQixirEFM9IaKxX1olZ3ke3nvxRS2xMDteKIDWxozW8= -github.com/aws/smithy-go v1.11.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 h1:9UJBZTFEmJt/luXhv4jkD5lZDeFUbWE/ZxpF0oAoJc8= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= diff --git a/service/amplifyuibuilder/serializers.go b/service/amplifyuibuilder/serializers.go index acc4bdd4661..e8410640574 100644 --- a/service/amplifyuibuilder/serializers.go +++ b/service/amplifyuibuilder/serializers.go @@ -49,6 +49,7 @@ func (m *awsRestjson1_serializeOpCreateComponent) HandleSerialize(ctx context.Co } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -143,6 +144,7 @@ func (m *awsRestjson1_serializeOpCreateTheme) HandleSerialize(ctx context.Contex } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -389,6 +391,7 @@ func (m *awsRestjson1_serializeOpExchangeCodeForToken) HandleSerialize(ctx conte } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -914,6 +917,7 @@ func (m *awsRestjson1_serializeOpRefreshToken) HandleSerialize(ctx context.Conte } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -995,6 +999,7 @@ func (m *awsRestjson1_serializeOpUpdateComponent) HandleSerialize(ctx context.Co } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -1098,6 +1103,7 @@ func (m *awsRestjson1_serializeOpUpdateTheme) HandleSerialize(ctx context.Contex } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } diff --git a/service/apigateway/go.mod b/service/apigateway/go.mod index 00f896a529d..5e60c9d94ce 100644 --- a/service/apigateway/go.mod +++ b/service/apigateway/go.mod @@ -6,7 +6,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.16.5 github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.12 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.6 - github.com/aws/smithy-go v1.11.3 + github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 ) replace github.com/aws/aws-sdk-go-v2 => ../../ diff --git a/service/apigateway/go.sum b/service/apigateway/go.sum index 86cce5bcbcc..3983dc04087 100644 --- a/service/apigateway/go.sum +++ b/service/apigateway/go.sum @@ -1,5 +1,5 @@ -github.com/aws/smithy-go v1.11.3 h1:DQixirEFM9IaKxX1olZ3ke3nvxRS2xMDteKIDWxozW8= -github.com/aws/smithy-go v1.11.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 h1:9UJBZTFEmJt/luXhv4jkD5lZDeFUbWE/ZxpF0oAoJc8= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= diff --git a/service/apigateway/serializers.go b/service/apigateway/serializers.go index c3711645176..a816f6e8ccb 100644 --- a/service/apigateway/serializers.go +++ b/service/apigateway/serializers.go @@ -6305,11 +6305,12 @@ func (m *awsRestjson1_serializeOpImportApiKeys) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } - if input.Body != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/octet-stream") - } + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/octet-stream") + } + if input.Body != nil { payload := bytes.NewReader(input.Body) if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -6373,11 +6374,12 @@ func (m *awsRestjson1_serializeOpImportDocumentationParts) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: err} } - if input.Body != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/octet-stream") - } + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/octet-stream") + } + if input.Body != nil { payload := bytes.NewReader(input.Body) if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -6450,11 +6452,12 @@ func (m *awsRestjson1_serializeOpImportRestApi) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } - if input.Body != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/octet-stream") - } + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/octet-stream") + } + if input.Body != nil { payload := bytes.NewReader(input.Body) if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -7183,11 +7186,12 @@ func (m *awsRestjson1_serializeOpPutRestApi) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: err} } - if input.Body != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/octet-stream") - } + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/octet-stream") + } + if input.Body != nil { payload := bytes.NewReader(input.Body) if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} diff --git a/service/apigatewaymanagementapi/go.mod b/service/apigatewaymanagementapi/go.mod index 87ba40e0d3d..8e9294ecd86 100644 --- a/service/apigatewaymanagementapi/go.mod +++ b/service/apigatewaymanagementapi/go.mod @@ -6,7 +6,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.16.5 github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.12 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.6 - github.com/aws/smithy-go v1.11.3 + github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 ) replace github.com/aws/aws-sdk-go-v2 => ../../ diff --git a/service/apigatewaymanagementapi/go.sum b/service/apigatewaymanagementapi/go.sum index 86cce5bcbcc..3983dc04087 100644 --- a/service/apigatewaymanagementapi/go.sum +++ b/service/apigatewaymanagementapi/go.sum @@ -1,5 +1,5 @@ -github.com/aws/smithy-go v1.11.3 h1:DQixirEFM9IaKxX1olZ3ke3nvxRS2xMDteKIDWxozW8= -github.com/aws/smithy-go v1.11.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 h1:9UJBZTFEmJt/luXhv4jkD5lZDeFUbWE/ZxpF0oAoJc8= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= diff --git a/service/apigatewaymanagementapi/serializers.go b/service/apigatewaymanagementapi/serializers.go index cad51fb9b8d..cb2e9a682ea 100644 --- a/service/apigatewaymanagementapi/serializers.go +++ b/service/apigatewaymanagementapi/serializers.go @@ -162,11 +162,12 @@ func (m *awsRestjson1_serializeOpPostToConnection) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } - if input.Data != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/octet-stream") - } + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/octet-stream") + } + if input.Data != nil { payload := bytes.NewReader(input.Data) if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} diff --git a/service/appconfig/go.mod b/service/appconfig/go.mod index 8538eef7379..9ed7ce62ebe 100644 --- a/service/appconfig/go.mod +++ b/service/appconfig/go.mod @@ -6,7 +6,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.16.5 github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.12 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.6 - github.com/aws/smithy-go v1.11.3 + github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 ) replace github.com/aws/aws-sdk-go-v2 => ../../ diff --git a/service/appconfig/go.sum b/service/appconfig/go.sum index 86cce5bcbcc..3983dc04087 100644 --- a/service/appconfig/go.sum +++ b/service/appconfig/go.sum @@ -1,5 +1,5 @@ -github.com/aws/smithy-go v1.11.3 h1:DQixirEFM9IaKxX1olZ3ke3nvxRS2xMDteKIDWxozW8= -github.com/aws/smithy-go v1.11.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 h1:9UJBZTFEmJt/luXhv4jkD5lZDeFUbWE/ZxpF0oAoJc8= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= diff --git a/service/appconfig/serializers.go b/service/appconfig/serializers.go index 9759133ca4a..f0d534f468f 100644 --- a/service/appconfig/serializers.go +++ b/service/appconfig/serializers.go @@ -462,11 +462,12 @@ func (m *awsRestjson1_serializeOpCreateHostedConfigurationVersion) HandleSeriali return out, metadata, &smithy.SerializationError{Err: err} } - if input.Content != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/octet-stream") - } + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/octet-stream") + } + if input.Content != nil { payload := bytes.NewReader(input.Content) if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} diff --git a/service/cloudfront/go.mod b/service/cloudfront/go.mod index acbffd1bb6e..33a4e0156dc 100644 --- a/service/cloudfront/go.mod +++ b/service/cloudfront/go.mod @@ -6,7 +6,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.16.5 github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.12 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.6 - github.com/aws/smithy-go v1.11.3 + github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 github.com/jmespath/go-jmespath v0.4.0 ) diff --git a/service/cloudfront/go.sum b/service/cloudfront/go.sum index 8bce9965be5..616ca36a561 100644 --- a/service/cloudfront/go.sum +++ b/service/cloudfront/go.sum @@ -1,5 +1,5 @@ -github.com/aws/smithy-go v1.11.3 h1:DQixirEFM9IaKxX1olZ3ke3nvxRS2xMDteKIDWxozW8= -github.com/aws/smithy-go v1.11.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 h1:9UJBZTFEmJt/luXhv4jkD5lZDeFUbWE/ZxpF0oAoJc8= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= diff --git a/service/cloudfront/serializers.go b/service/cloudfront/serializers.go index 98b37bbca45..1a21ecab175 100644 --- a/service/cloudfront/serializers.go +++ b/service/cloudfront/serializers.go @@ -109,6 +109,7 @@ func (m *awsRestxml_serializeOpCreateCachePolicy) HandleSerialize(ctx context.Co if input.CachePolicyConfig != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -177,6 +178,7 @@ func (m *awsRestxml_serializeOpCreateCloudFrontOriginAccessIdentity) HandleSeria if input.CloudFrontOriginAccessIdentityConfig != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -245,6 +247,7 @@ func (m *awsRestxml_serializeOpCreateDistribution) HandleSerialize(ctx context.C if input.DistributionConfig != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -313,6 +316,7 @@ func (m *awsRestxml_serializeOpCreateDistributionWithTags) HandleSerialize(ctx c if input.DistributionConfigWithTags != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -381,6 +385,7 @@ func (m *awsRestxml_serializeOpCreateFieldLevelEncryptionConfig) HandleSerialize if input.FieldLevelEncryptionConfig != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -449,6 +454,7 @@ func (m *awsRestxml_serializeOpCreateFieldLevelEncryptionProfile) HandleSerializ if input.FieldLevelEncryptionProfileConfig != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -624,6 +630,7 @@ func (m *awsRestxml_serializeOpCreateInvalidation) HandleSerialize(ctx context.C if input.InvalidationBatch != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -701,6 +708,7 @@ func (m *awsRestxml_serializeOpCreateKeyGroup) HandleSerialize(ctx context.Conte if input.KeyGroupConfig != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -773,6 +781,7 @@ func (m *awsRestxml_serializeOpCreateMonitoringSubscription) HandleSerialize(ctx if input.MonitoringSubscription != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -850,6 +859,7 @@ func (m *awsRestxml_serializeOpCreateOriginRequestPolicy) HandleSerialize(ctx co if input.OriginRequestPolicyConfig != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -918,6 +928,7 @@ func (m *awsRestxml_serializeOpCreatePublicKey) HandleSerialize(ctx context.Cont if input.PublicKeyConfig != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -1102,6 +1113,7 @@ func (m *awsRestxml_serializeOpCreateResponseHeadersPolicy) HandleSerialize(ctx if input.ResponseHeadersPolicyConfig != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -1170,6 +1182,7 @@ func (m *awsRestxml_serializeOpCreateStreamingDistribution) HandleSerialize(ctx if input.StreamingDistributionConfig != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -1238,6 +1251,7 @@ func (m *awsRestxml_serializeOpCreateStreamingDistributionWithTags) HandleSerial if input.StreamingDistributionConfigWithTags != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -5039,6 +5053,7 @@ func (m *awsRestxml_serializeOpTagResource) HandleSerialize(ctx context.Context, if input.Tags != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -5223,6 +5238,7 @@ func (m *awsRestxml_serializeOpUntagResource) HandleSerialize(ctx context.Contex if input.TagKeys != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -5299,6 +5315,7 @@ func (m *awsRestxml_serializeOpUpdateCachePolicy) HandleSerialize(ctx context.Co if input.CachePolicyConfig != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -5385,6 +5402,7 @@ func (m *awsRestxml_serializeOpUpdateCloudFrontOriginAccessIdentity) HandleSeria if input.CloudFrontOriginAccessIdentityConfig != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -5471,6 +5489,7 @@ func (m *awsRestxml_serializeOpUpdateDistribution) HandleSerialize(ctx context.C if input.DistributionConfig != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -5557,6 +5576,7 @@ func (m *awsRestxml_serializeOpUpdateFieldLevelEncryptionConfig) HandleSerialize if input.FieldLevelEncryptionConfig != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -5643,6 +5663,7 @@ func (m *awsRestxml_serializeOpUpdateFieldLevelEncryptionProfile) HandleSerializ if input.FieldLevelEncryptionProfileConfig != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -5839,6 +5860,7 @@ func (m *awsRestxml_serializeOpUpdateKeyGroup) HandleSerialize(ctx context.Conte if input.KeyGroupConfig != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -5925,6 +5947,7 @@ func (m *awsRestxml_serializeOpUpdateOriginRequestPolicy) HandleSerialize(ctx co if input.OriginRequestPolicyConfig != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -6011,6 +6034,7 @@ func (m *awsRestxml_serializeOpUpdatePublicKey) HandleSerialize(ctx context.Cont if input.PublicKeyConfig != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -6224,6 +6248,7 @@ func (m *awsRestxml_serializeOpUpdateResponseHeadersPolicy) HandleSerialize(ctx if input.ResponseHeadersPolicyConfig != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -6310,6 +6335,7 @@ func (m *awsRestxml_serializeOpUpdateStreamingDistribution) HandleSerialize(ctx if input.StreamingDistributionConfig != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } diff --git a/service/cloudsearchdomain/go.mod b/service/cloudsearchdomain/go.mod index 8eb92855e16..c66051ed04b 100644 --- a/service/cloudsearchdomain/go.mod +++ b/service/cloudsearchdomain/go.mod @@ -6,7 +6,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.16.5 github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.12 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.6 - github.com/aws/smithy-go v1.11.3 + github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 ) replace github.com/aws/aws-sdk-go-v2 => ../../ diff --git a/service/cloudsearchdomain/go.sum b/service/cloudsearchdomain/go.sum index 86cce5bcbcc..3983dc04087 100644 --- a/service/cloudsearchdomain/go.sum +++ b/service/cloudsearchdomain/go.sum @@ -1,5 +1,5 @@ -github.com/aws/smithy-go v1.11.3 h1:DQixirEFM9IaKxX1olZ3ke3nvxRS2xMDteKIDWxozW8= -github.com/aws/smithy-go v1.11.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 h1:9UJBZTFEmJt/luXhv4jkD5lZDeFUbWE/ZxpF0oAoJc8= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= diff --git a/service/cloudsearchdomain/serializers.go b/service/cloudsearchdomain/serializers.go index 1c8061188e9..9933c7344c7 100644 --- a/service/cloudsearchdomain/serializers.go +++ b/service/cloudsearchdomain/serializers.go @@ -211,11 +211,12 @@ func (m *awsRestjson1_serializeOpUploadDocuments) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: err} } - if input.Documents != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/octet-stream") - } + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/octet-stream") + } + if input.Documents != nil { payload := input.Documents if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} diff --git a/service/codeguruprofiler/go.mod b/service/codeguruprofiler/go.mod index e62f2167012..d5be1da01f2 100644 --- a/service/codeguruprofiler/go.mod +++ b/service/codeguruprofiler/go.mod @@ -6,7 +6,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.16.5 github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.12 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.6 - github.com/aws/smithy-go v1.11.3 + github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 ) replace github.com/aws/aws-sdk-go-v2 => ../../ diff --git a/service/codeguruprofiler/go.sum b/service/codeguruprofiler/go.sum index 86cce5bcbcc..3983dc04087 100644 --- a/service/codeguruprofiler/go.sum +++ b/service/codeguruprofiler/go.sum @@ -1,5 +1,5 @@ -github.com/aws/smithy-go v1.11.3 h1:DQixirEFM9IaKxX1olZ3ke3nvxRS2xMDteKIDWxozW8= -github.com/aws/smithy-go v1.11.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 h1:9UJBZTFEmJt/luXhv4jkD5lZDeFUbWE/ZxpF0oAoJc8= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= diff --git a/service/codeguruprofiler/serializers.go b/service/codeguruprofiler/serializers.go index b9d1cf2505d..8f108947686 100644 --- a/service/codeguruprofiler/serializers.go +++ b/service/codeguruprofiler/serializers.go @@ -1135,11 +1135,12 @@ func (m *awsRestjson1_serializeOpPostAgentProfile) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } - if input.AgentProfile != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/octet-stream") - } + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/octet-stream") + } + if input.AgentProfile != nil { payload := bytes.NewReader(input.AgentProfile) if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} diff --git a/service/dataexchange/go.mod b/service/dataexchange/go.mod index 2e685016065..83b57d42014 100644 --- a/service/dataexchange/go.mod +++ b/service/dataexchange/go.mod @@ -6,7 +6,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.16.5 github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.12 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.6 - github.com/aws/smithy-go v1.11.3 + github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 ) replace github.com/aws/aws-sdk-go-v2 => ../../ diff --git a/service/dataexchange/go.sum b/service/dataexchange/go.sum index 86cce5bcbcc..3983dc04087 100644 --- a/service/dataexchange/go.sum +++ b/service/dataexchange/go.sum @@ -1,5 +1,5 @@ -github.com/aws/smithy-go v1.11.3 h1:DQixirEFM9IaKxX1olZ3ke3nvxRS2xMDteKIDWxozW8= -github.com/aws/smithy-go v1.11.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 h1:9UJBZTFEmJt/luXhv4jkD5lZDeFUbWE/ZxpF0oAoJc8= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= diff --git a/service/dataexchange/serializers.go b/service/dataexchange/serializers.go index b2b2729a190..4f98f94845e 100644 --- a/service/dataexchange/serializers.go +++ b/service/dataexchange/serializers.go @@ -1485,11 +1485,12 @@ func (m *awsRestjson1_serializeOpSendApiAsset) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: err} } - if input.Body != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("text/plain") - } + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("text/plain") + } + if input.Body != nil { payload := strings.NewReader(*input.Body) if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} diff --git a/service/docdb/api_client.go b/service/docdb/api_client.go index bee00b131f3..46080b200f5 100644 --- a/service/docdb/api_client.go +++ b/service/docdb/api_client.go @@ -512,6 +512,9 @@ func (c presignConverter) convertToPresignMiddleware(stack *middleware.Stack, op if err != nil { return err } + if err = smithyhttp.AddNoPayloadDefaultContentTypeRemover(stack); err != nil { + return err + } // convert request to a GET request err = query.AddAsGetRequestMiddleware(stack) if err != nil { diff --git a/service/docdb/go.mod b/service/docdb/go.mod index 5c74e09ee17..09aeebe249a 100644 --- a/service/docdb/go.mod +++ b/service/docdb/go.mod @@ -7,7 +7,7 @@ require ( github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.12 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.6 github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.6 - github.com/aws/smithy-go v1.11.3 + github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 github.com/jmespath/go-jmespath v0.4.0 ) diff --git a/service/docdb/go.sum b/service/docdb/go.sum index 8bce9965be5..616ca36a561 100644 --- a/service/docdb/go.sum +++ b/service/docdb/go.sum @@ -1,5 +1,5 @@ -github.com/aws/smithy-go v1.11.3 h1:DQixirEFM9IaKxX1olZ3ke3nvxRS2xMDteKIDWxozW8= -github.com/aws/smithy-go v1.11.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 h1:9UJBZTFEmJt/luXhv4jkD5lZDeFUbWE/ZxpF0oAoJc8= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= diff --git a/service/ebs/go.mod b/service/ebs/go.mod index f910120d12e..39f7db216f2 100644 --- a/service/ebs/go.mod +++ b/service/ebs/go.mod @@ -6,7 +6,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.16.5 github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.12 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.6 - github.com/aws/smithy-go v1.11.3 + github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 ) replace github.com/aws/aws-sdk-go-v2 => ../../ diff --git a/service/ebs/go.sum b/service/ebs/go.sum index 86cce5bcbcc..3983dc04087 100644 --- a/service/ebs/go.sum +++ b/service/ebs/go.sum @@ -1,5 +1,5 @@ -github.com/aws/smithy-go v1.11.3 h1:DQixirEFM9IaKxX1olZ3ke3nvxRS2xMDteKIDWxozW8= -github.com/aws/smithy-go v1.11.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 h1:9UJBZTFEmJt/luXhv4jkD5lZDeFUbWE/ZxpF0oAoJc8= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= diff --git a/service/ebs/serializers.go b/service/ebs/serializers.go index 7923b730c25..d26a285c33b 100644 --- a/service/ebs/serializers.go +++ b/service/ebs/serializers.go @@ -341,11 +341,12 @@ func (m *awsRestjson1_serializeOpPutSnapshotBlock) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } - if input.BlockData != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/octet-stream") - } + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/octet-stream") + } + if input.BlockData != nil { payload := input.BlockData if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} diff --git a/service/ec2/api_client.go b/service/ec2/api_client.go index 13a332a510a..330b347d9ec 100644 --- a/service/ec2/api_client.go +++ b/service/ec2/api_client.go @@ -532,6 +532,9 @@ func (c presignConverter) convertToPresignMiddleware(stack *middleware.Stack, op if err != nil { return err } + if err = smithyhttp.AddNoPayloadDefaultContentTypeRemover(stack); err != nil { + return err + } // convert request to a GET request err = query.AddAsGetRequestMiddleware(stack) if err != nil { diff --git a/service/ec2/go.mod b/service/ec2/go.mod index f39253fa3ac..535ddeb6bf8 100644 --- a/service/ec2/go.mod +++ b/service/ec2/go.mod @@ -7,7 +7,7 @@ require ( github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.12 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.6 github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.6 - github.com/aws/smithy-go v1.11.3 + github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 github.com/jmespath/go-jmespath v0.4.0 ) diff --git a/service/ec2/go.sum b/service/ec2/go.sum index 8bce9965be5..616ca36a561 100644 --- a/service/ec2/go.sum +++ b/service/ec2/go.sum @@ -1,5 +1,5 @@ -github.com/aws/smithy-go v1.11.3 h1:DQixirEFM9IaKxX1olZ3ke3nvxRS2xMDteKIDWxozW8= -github.com/aws/smithy-go v1.11.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 h1:9UJBZTFEmJt/luXhv4jkD5lZDeFUbWE/ZxpF0oAoJc8= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= diff --git a/service/glacier/go.mod b/service/glacier/go.mod index 119fb9caf2f..062421b34a3 100644 --- a/service/glacier/go.mod +++ b/service/glacier/go.mod @@ -6,7 +6,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.16.5 github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.12 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.6 - github.com/aws/smithy-go v1.11.3 + github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 ) replace github.com/aws/aws-sdk-go-v2 => ../../ diff --git a/service/glacier/go.sum b/service/glacier/go.sum index 86cce5bcbcc..3983dc04087 100644 --- a/service/glacier/go.sum +++ b/service/glacier/go.sum @@ -1,5 +1,5 @@ -github.com/aws/smithy-go v1.11.3 h1:DQixirEFM9IaKxX1olZ3ke3nvxRS2xMDteKIDWxozW8= -github.com/aws/smithy-go v1.11.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 h1:9UJBZTFEmJt/luXhv4jkD5lZDeFUbWE/ZxpF0oAoJc8= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= diff --git a/service/glacier/serializers.go b/service/glacier/serializers.go index e89a44d1ef1..08a1c0f3333 100644 --- a/service/glacier/serializers.go +++ b/service/glacier/serializers.go @@ -1273,6 +1273,7 @@ func (m *awsRestjson1_serializeOpInitiateJob) HandleSerialize(ctx context.Contex } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -1440,6 +1441,7 @@ func (m *awsRestjson1_serializeOpInitiateVaultLock) HandleSerialize(ctx context. } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -2196,6 +2198,7 @@ func (m *awsRestjson1_serializeOpSetVaultAccessPolicy) HandleSerialize(ctx conte } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -2286,6 +2289,7 @@ func (m *awsRestjson1_serializeOpSetVaultNotifications) HandleSerialize(ctx cont } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -2375,11 +2379,12 @@ func (m *awsRestjson1_serializeOpUploadArchive) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } - if input.Body != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/octet-stream") - } + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/octet-stream") + } + if input.Body != nil { payload := input.Body if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -2463,11 +2468,12 @@ func (m *awsRestjson1_serializeOpUploadMultipartPart) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: err} } - if input.Body != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/octet-stream") - } + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/octet-stream") + } + if input.Body != nil { payload := input.Body if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} diff --git a/service/iot/go.mod b/service/iot/go.mod index 7302728b30f..bd9cab4828b 100644 --- a/service/iot/go.mod +++ b/service/iot/go.mod @@ -6,7 +6,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.16.5 github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.12 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.6 - github.com/aws/smithy-go v1.11.3 + github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 ) replace github.com/aws/aws-sdk-go-v2 => ../../ diff --git a/service/iot/go.sum b/service/iot/go.sum index 86cce5bcbcc..3983dc04087 100644 --- a/service/iot/go.sum +++ b/service/iot/go.sum @@ -1,5 +1,5 @@ -github.com/aws/smithy-go v1.11.3 h1:DQixirEFM9IaKxX1olZ3ke3nvxRS2xMDteKIDWxozW8= -github.com/aws/smithy-go v1.11.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 h1:9UJBZTFEmJt/luXhv4jkD5lZDeFUbWE/ZxpF0oAoJc8= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= diff --git a/service/iot/serializers.go b/service/iot/serializers.go index 3430c24fab8..0f6f11c0589 100644 --- a/service/iot/serializers.go +++ b/service/iot/serializers.go @@ -3799,6 +3799,7 @@ func (m *awsRestjson1_serializeOpCreateTopicRule) HandleSerialize(ctx context.Co } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -13630,6 +13631,7 @@ func (m *awsRestjson1_serializeOpReplaceTopicRule) HandleSerialize(ctx context.C } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -13930,6 +13932,7 @@ func (m *awsRestjson1_serializeOpSetLoggingOptions) HandleSerialize(ctx context. } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } diff --git a/service/iotdataplane/go.mod b/service/iotdataplane/go.mod index 3f1ef392129..afef4e5008a 100644 --- a/service/iotdataplane/go.mod +++ b/service/iotdataplane/go.mod @@ -6,7 +6,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.16.5 github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.12 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.6 - github.com/aws/smithy-go v1.11.3 + github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 ) replace github.com/aws/aws-sdk-go-v2 => ../../ diff --git a/service/iotdataplane/go.sum b/service/iotdataplane/go.sum index 86cce5bcbcc..3983dc04087 100644 --- a/service/iotdataplane/go.sum +++ b/service/iotdataplane/go.sum @@ -1,5 +1,5 @@ -github.com/aws/smithy-go v1.11.3 h1:DQixirEFM9IaKxX1olZ3ke3nvxRS2xMDteKIDWxozW8= -github.com/aws/smithy-go v1.11.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 h1:9UJBZTFEmJt/luXhv4jkD5lZDeFUbWE/ZxpF0oAoJc8= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= diff --git a/service/iotdataplane/serializers.go b/service/iotdataplane/serializers.go index 930baba7805..fbf2597a089 100644 --- a/service/iotdataplane/serializers.go +++ b/service/iotdataplane/serializers.go @@ -351,11 +351,12 @@ func (m *awsRestjson1_serializeOpPublish) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: err} } - if input.Payload != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/octet-stream") - } + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/octet-stream") + } + if input.Payload != nil { payload := bytes.NewReader(input.Payload) if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -428,11 +429,12 @@ func (m *awsRestjson1_serializeOpUpdateThingShadow) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: err} } - if input.Payload != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/octet-stream") - } + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/octet-stream") + } + if input.Payload != nil { payload := bytes.NewReader(input.Payload) if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} diff --git a/service/lambda/go.mod b/service/lambda/go.mod index 9ccaafd9827..6b6d4059971 100644 --- a/service/lambda/go.mod +++ b/service/lambda/go.mod @@ -6,7 +6,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.16.5 github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.12 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.6 - github.com/aws/smithy-go v1.11.3 + github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 github.com/jmespath/go-jmespath v0.4.0 ) diff --git a/service/lambda/go.sum b/service/lambda/go.sum index 8bce9965be5..616ca36a561 100644 --- a/service/lambda/go.sum +++ b/service/lambda/go.sum @@ -1,5 +1,5 @@ -github.com/aws/smithy-go v1.11.3 h1:DQixirEFM9IaKxX1olZ3ke3nvxRS2xMDteKIDWxozW8= -github.com/aws/smithy-go v1.11.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 h1:9UJBZTFEmJt/luXhv4jkD5lZDeFUbWE/ZxpF0oAoJc8= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= diff --git a/service/lambda/serializers.go b/service/lambda/serializers.go index 7ae89625576..7b79aeeefae 100644 --- a/service/lambda/serializers.go +++ b/service/lambda/serializers.go @@ -2428,11 +2428,12 @@ func (m *awsRestjson1_serializeOpInvoke) HandleSerialize(ctx context.Context, in return out, metadata, &smithy.SerializationError{Err: err} } - if input.Payload != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/octet-stream") - } + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/octet-stream") + } + if input.Payload != nil { payload := bytes.NewReader(input.Payload) if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -2516,11 +2517,12 @@ func (m *awsRestjson1_serializeOpInvokeAsync) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: err} } - if input.InvokeArgs != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/octet-stream") - } + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/octet-stream") + } + if input.InvokeArgs != nil { payload := input.InvokeArgs if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} diff --git a/service/lexruntimeservice/go.mod b/service/lexruntimeservice/go.mod index dd2020a8e73..25bcc0aef14 100644 --- a/service/lexruntimeservice/go.mod +++ b/service/lexruntimeservice/go.mod @@ -6,7 +6,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.16.5 github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.12 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.6 - github.com/aws/smithy-go v1.11.3 + github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 ) replace github.com/aws/aws-sdk-go-v2 => ../../ diff --git a/service/lexruntimeservice/go.sum b/service/lexruntimeservice/go.sum index 86cce5bcbcc..3983dc04087 100644 --- a/service/lexruntimeservice/go.sum +++ b/service/lexruntimeservice/go.sum @@ -1,5 +1,5 @@ -github.com/aws/smithy-go v1.11.3 h1:DQixirEFM9IaKxX1olZ3ke3nvxRS2xMDteKIDWxozW8= -github.com/aws/smithy-go v1.11.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 h1:9UJBZTFEmJt/luXhv4jkD5lZDeFUbWE/ZxpF0oAoJc8= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= diff --git a/service/lexruntimeservice/serializers.go b/service/lexruntimeservice/serializers.go index 63b2af70632..b8a095817c8 100644 --- a/service/lexruntimeservice/serializers.go +++ b/service/lexruntimeservice/serializers.go @@ -206,11 +206,12 @@ func (m *awsRestjson1_serializeOpPostContent) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: err} } - if input.InputStream != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/octet-stream") - } + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/octet-stream") + } + if input.InputStream != nil { payload := input.InputStream if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} diff --git a/service/lexruntimev2/go.mod b/service/lexruntimev2/go.mod index 1a6beed83c9..edd2cb13095 100644 --- a/service/lexruntimev2/go.mod +++ b/service/lexruntimev2/go.mod @@ -7,7 +7,7 @@ require ( github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.2 github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.12 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.6 - github.com/aws/smithy-go v1.11.3 + github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 ) replace github.com/aws/aws-sdk-go-v2 => ../../ diff --git a/service/lexruntimev2/go.sum b/service/lexruntimev2/go.sum index 86cce5bcbcc..3983dc04087 100644 --- a/service/lexruntimev2/go.sum +++ b/service/lexruntimev2/go.sum @@ -1,5 +1,5 @@ -github.com/aws/smithy-go v1.11.3 h1:DQixirEFM9IaKxX1olZ3ke3nvxRS2xMDteKIDWxozW8= -github.com/aws/smithy-go v1.11.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 h1:9UJBZTFEmJt/luXhv4jkD5lZDeFUbWE/ZxpF0oAoJc8= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= diff --git a/service/lexruntimev2/serializers.go b/service/lexruntimev2/serializers.go index 512b482ce09..e8acb0b3d80 100644 --- a/service/lexruntimev2/serializers.go +++ b/service/lexruntimev2/serializers.go @@ -471,11 +471,12 @@ func (m *awsRestjson1_serializeOpRecognizeUtterance) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: err} } - if input.InputStream != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/octet-stream") - } + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/octet-stream") + } + if input.InputStream != nil { payload := input.InputStream if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} diff --git a/service/lookoutvision/go.mod b/service/lookoutvision/go.mod index d203fcb7997..de4aae272cb 100644 --- a/service/lookoutvision/go.mod +++ b/service/lookoutvision/go.mod @@ -6,7 +6,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.16.5 github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.12 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.6 - github.com/aws/smithy-go v1.11.3 + github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 ) replace github.com/aws/aws-sdk-go-v2 => ../../ diff --git a/service/lookoutvision/go.sum b/service/lookoutvision/go.sum index 86cce5bcbcc..3983dc04087 100644 --- a/service/lookoutvision/go.sum +++ b/service/lookoutvision/go.sum @@ -1,5 +1,5 @@ -github.com/aws/smithy-go v1.11.3 h1:DQixirEFM9IaKxX1olZ3ke3nvxRS2xMDteKIDWxozW8= -github.com/aws/smithy-go v1.11.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 h1:9UJBZTFEmJt/luXhv4jkD5lZDeFUbWE/ZxpF0oAoJc8= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= diff --git a/service/lookoutvision/serializers.go b/service/lookoutvision/serializers.go index 3f3aee44ce2..0208a086d52 100644 --- a/service/lookoutvision/serializers.go +++ b/service/lookoutvision/serializers.go @@ -790,11 +790,12 @@ func (m *awsRestjson1_serializeOpDetectAnomalies) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: err} } - if input.Body != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/octet-stream") - } + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/octet-stream") + } + if input.Body != nil { payload := input.Body if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} diff --git a/service/mediastoredata/go.mod b/service/mediastoredata/go.mod index 6202a5a1dcc..f303a6afcb7 100644 --- a/service/mediastoredata/go.mod +++ b/service/mediastoredata/go.mod @@ -6,7 +6,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.16.5 github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.12 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.6 - github.com/aws/smithy-go v1.11.3 + github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 ) replace github.com/aws/aws-sdk-go-v2 => ../../ diff --git a/service/mediastoredata/go.sum b/service/mediastoredata/go.sum index 86cce5bcbcc..3983dc04087 100644 --- a/service/mediastoredata/go.sum +++ b/service/mediastoredata/go.sum @@ -1,5 +1,5 @@ -github.com/aws/smithy-go v1.11.3 h1:DQixirEFM9IaKxX1olZ3ke3nvxRS2xMDteKIDWxozW8= -github.com/aws/smithy-go v1.11.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 h1:9UJBZTFEmJt/luXhv4jkD5lZDeFUbWE/ZxpF0oAoJc8= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= diff --git a/service/mediastoredata/serializers.go b/service/mediastoredata/serializers.go index 8c1bddf742b..7e2e44e3bfd 100644 --- a/service/mediastoredata/serializers.go +++ b/service/mediastoredata/serializers.go @@ -285,11 +285,12 @@ func (m *awsRestjson1_serializeOpPutObject) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: err} } - if input.Body != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/octet-stream") - } + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/octet-stream") + } + if input.Body != nil { payload := input.Body if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} diff --git a/service/mobile/go.mod b/service/mobile/go.mod index 8773f6823e6..cdc296d0df7 100644 --- a/service/mobile/go.mod +++ b/service/mobile/go.mod @@ -6,7 +6,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.16.5 github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.12 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.6 - github.com/aws/smithy-go v1.11.3 + github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 ) replace github.com/aws/aws-sdk-go-v2 => ../../ diff --git a/service/mobile/go.sum b/service/mobile/go.sum index 86cce5bcbcc..3983dc04087 100644 --- a/service/mobile/go.sum +++ b/service/mobile/go.sum @@ -1,5 +1,5 @@ -github.com/aws/smithy-go v1.11.3 h1:DQixirEFM9IaKxX1olZ3ke3nvxRS2xMDteKIDWxozW8= -github.com/aws/smithy-go v1.11.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 h1:9UJBZTFEmJt/luXhv4jkD5lZDeFUbWE/ZxpF0oAoJc8= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= diff --git a/service/mobile/serializers.go b/service/mobile/serializers.go index 00392d02e2c..84a2dfad752 100644 --- a/service/mobile/serializers.go +++ b/service/mobile/serializers.go @@ -46,11 +46,12 @@ func (m *awsRestjson1_serializeOpCreateProject) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } - if input.Contents != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/octet-stream") - } + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/octet-stream") + } + if input.Contents != nil { payload := bytes.NewReader(input.Contents) if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -529,11 +530,12 @@ func (m *awsRestjson1_serializeOpUpdateProject) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } - if input.Contents != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/octet-stream") - } + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/octet-stream") + } + if input.Contents != nil { payload := bytes.NewReader(input.Contents) if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} diff --git a/service/neptune/api_client.go b/service/neptune/api_client.go index b0468fa9713..d042dfdfe50 100644 --- a/service/neptune/api_client.go +++ b/service/neptune/api_client.go @@ -511,6 +511,9 @@ func (c presignConverter) convertToPresignMiddleware(stack *middleware.Stack, op if err != nil { return err } + if err = smithyhttp.AddNoPayloadDefaultContentTypeRemover(stack); err != nil { + return err + } // convert request to a GET request err = query.AddAsGetRequestMiddleware(stack) if err != nil { diff --git a/service/neptune/go.mod b/service/neptune/go.mod index 041de48ebc5..ba65eec1286 100644 --- a/service/neptune/go.mod +++ b/service/neptune/go.mod @@ -7,7 +7,7 @@ require ( github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.12 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.6 github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.6 - github.com/aws/smithy-go v1.11.3 + github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 github.com/jmespath/go-jmespath v0.4.0 ) diff --git a/service/neptune/go.sum b/service/neptune/go.sum index 8bce9965be5..616ca36a561 100644 --- a/service/neptune/go.sum +++ b/service/neptune/go.sum @@ -1,5 +1,5 @@ -github.com/aws/smithy-go v1.11.3 h1:DQixirEFM9IaKxX1olZ3ke3nvxRS2xMDteKIDWxozW8= -github.com/aws/smithy-go v1.11.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 h1:9UJBZTFEmJt/luXhv4jkD5lZDeFUbWE/ZxpF0oAoJc8= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= diff --git a/service/pinpoint/go.mod b/service/pinpoint/go.mod index f0423f2a94d..91fcc1c7856 100644 --- a/service/pinpoint/go.mod +++ b/service/pinpoint/go.mod @@ -6,7 +6,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.16.5 github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.12 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.6 - github.com/aws/smithy-go v1.11.3 + github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 ) replace github.com/aws/aws-sdk-go-v2 => ../../ diff --git a/service/pinpoint/go.sum b/service/pinpoint/go.sum index 86cce5bcbcc..3983dc04087 100644 --- a/service/pinpoint/go.sum +++ b/service/pinpoint/go.sum @@ -1,5 +1,5 @@ -github.com/aws/smithy-go v1.11.3 h1:DQixirEFM9IaKxX1olZ3ke3nvxRS2xMDteKIDWxozW8= -github.com/aws/smithy-go v1.11.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 h1:9UJBZTFEmJt/luXhv4jkD5lZDeFUbWE/ZxpF0oAoJc8= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= diff --git a/service/pinpoint/serializers.go b/service/pinpoint/serializers.go index bda3af76997..a657e986224 100644 --- a/service/pinpoint/serializers.go +++ b/service/pinpoint/serializers.go @@ -47,6 +47,7 @@ func (m *awsRestjson1_serializeOpCreateApp) HandleSerialize(ctx context.Context, } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -119,6 +120,7 @@ func (m *awsRestjson1_serializeOpCreateCampaign) HandleSerialize(ctx context.Con } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -200,6 +202,7 @@ func (m *awsRestjson1_serializeOpCreateEmailTemplate) HandleSerialize(ctx contex } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -281,6 +284,7 @@ func (m *awsRestjson1_serializeOpCreateExportJob) HandleSerialize(ctx context.Co } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -362,6 +366,7 @@ func (m *awsRestjson1_serializeOpCreateImportJob) HandleSerialize(ctx context.Co } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -443,6 +448,7 @@ func (m *awsRestjson1_serializeOpCreateInAppTemplate) HandleSerialize(ctx contex } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -524,6 +530,7 @@ func (m *awsRestjson1_serializeOpCreateJourney) HandleSerialize(ctx context.Cont } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -605,6 +612,7 @@ func (m *awsRestjson1_serializeOpCreatePushTemplate) HandleSerialize(ctx context } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -682,6 +690,7 @@ func (m *awsRestjson1_serializeOpCreateRecommenderConfiguration) HandleSerialize } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -754,6 +763,7 @@ func (m *awsRestjson1_serializeOpCreateSegment) HandleSerialize(ctx context.Cont } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -835,6 +845,7 @@ func (m *awsRestjson1_serializeOpCreateSmsTemplate) HandleSerialize(ctx context. } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -916,6 +927,7 @@ func (m *awsRestjson1_serializeOpCreateVoiceTemplate) HandleSerialize(ctx contex } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -5703,6 +5715,7 @@ func (m *awsRestjson1_serializeOpPhoneNumberValidate) HandleSerialize(ctx contex } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -5775,6 +5788,7 @@ func (m *awsRestjson1_serializeOpPutEvents) HandleSerialize(ctx context.Context, } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -5856,6 +5870,7 @@ func (m *awsRestjson1_serializeOpPutEventStream) HandleSerialize(ctx context.Con } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -5937,6 +5952,7 @@ func (m *awsRestjson1_serializeOpRemoveAttributes) HandleSerialize(ctx context.C } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -6027,6 +6043,7 @@ func (m *awsRestjson1_serializeOpSendMessages) HandleSerialize(ctx context.Conte } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -6108,6 +6125,7 @@ func (m *awsRestjson1_serializeOpSendOTPMessage) HandleSerialize(ctx context.Con } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -6189,6 +6207,7 @@ func (m *awsRestjson1_serializeOpSendUsersMessages) HandleSerialize(ctx context. } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -6270,6 +6289,7 @@ func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Contex } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -6415,6 +6435,7 @@ func (m *awsRestjson1_serializeOpUpdateAdmChannel) HandleSerialize(ctx context.C } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -6496,6 +6517,7 @@ func (m *awsRestjson1_serializeOpUpdateApnsChannel) HandleSerialize(ctx context. } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -6577,6 +6599,7 @@ func (m *awsRestjson1_serializeOpUpdateApnsSandboxChannel) HandleSerialize(ctx c } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -6658,6 +6681,7 @@ func (m *awsRestjson1_serializeOpUpdateApnsVoipChannel) HandleSerialize(ctx cont } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -6739,6 +6763,7 @@ func (m *awsRestjson1_serializeOpUpdateApnsVoipSandboxChannel) HandleSerialize(c } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -6820,6 +6845,7 @@ func (m *awsRestjson1_serializeOpUpdateApplicationSettings) HandleSerialize(ctx } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -6901,6 +6927,7 @@ func (m *awsRestjson1_serializeOpUpdateBaiduChannel) HandleSerialize(ctx context } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -6982,6 +7009,7 @@ func (m *awsRestjson1_serializeOpUpdateCampaign) HandleSerialize(ctx context.Con } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -7072,6 +7100,7 @@ func (m *awsRestjson1_serializeOpUpdateEmailChannel) HandleSerialize(ctx context } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -7153,6 +7182,7 @@ func (m *awsRestjson1_serializeOpUpdateEmailTemplate) HandleSerialize(ctx contex } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -7242,6 +7272,7 @@ func (m *awsRestjson1_serializeOpUpdateEndpoint) HandleSerialize(ctx context.Con } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -7332,6 +7363,7 @@ func (m *awsRestjson1_serializeOpUpdateEndpointsBatch) HandleSerialize(ctx conte } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -7413,6 +7445,7 @@ func (m *awsRestjson1_serializeOpUpdateGcmChannel) HandleSerialize(ctx context.C } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -7494,6 +7527,7 @@ func (m *awsRestjson1_serializeOpUpdateInAppTemplate) HandleSerialize(ctx contex } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -7583,6 +7617,7 @@ func (m *awsRestjson1_serializeOpUpdateJourney) HandleSerialize(ctx context.Cont } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -7673,6 +7708,7 @@ func (m *awsRestjson1_serializeOpUpdateJourneyState) HandleSerialize(ctx context } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -7763,6 +7799,7 @@ func (m *awsRestjson1_serializeOpUpdatePushTemplate) HandleSerialize(ctx context } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -7852,6 +7889,7 @@ func (m *awsRestjson1_serializeOpUpdateRecommenderConfiguration) HandleSerialize } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -7933,6 +7971,7 @@ func (m *awsRestjson1_serializeOpUpdateSegment) HandleSerialize(ctx context.Cont } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -8023,6 +8062,7 @@ func (m *awsRestjson1_serializeOpUpdateSmsChannel) HandleSerialize(ctx context.C } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -8104,6 +8144,7 @@ func (m *awsRestjson1_serializeOpUpdateSmsTemplate) HandleSerialize(ctx context. } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -8193,6 +8234,7 @@ func (m *awsRestjson1_serializeOpUpdateTemplateActiveVersion) HandleSerialize(ct } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -8283,6 +8325,7 @@ func (m *awsRestjson1_serializeOpUpdateVoiceChannel) HandleSerialize(ctx context } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -8364,6 +8407,7 @@ func (m *awsRestjson1_serializeOpUpdateVoiceTemplate) HandleSerialize(ctx contex } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } @@ -8453,6 +8497,7 @@ func (m *awsRestjson1_serializeOpVerifyOTPMessage) HandleSerialize(ctx context.C } if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/json") } diff --git a/service/rds/api_client.go b/service/rds/api_client.go index 4833992d041..85773dafbba 100644 --- a/service/rds/api_client.go +++ b/service/rds/api_client.go @@ -512,6 +512,9 @@ func (c presignConverter) convertToPresignMiddleware(stack *middleware.Stack, op if err != nil { return err } + if err = smithyhttp.AddNoPayloadDefaultContentTypeRemover(stack); err != nil { + return err + } // convert request to a GET request err = query.AddAsGetRequestMiddleware(stack) if err != nil { diff --git a/service/rds/go.mod b/service/rds/go.mod index 93f83fd4c2c..d9bad270288 100644 --- a/service/rds/go.mod +++ b/service/rds/go.mod @@ -7,7 +7,7 @@ require ( github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.12 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.6 github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.6 - github.com/aws/smithy-go v1.11.3 + github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 github.com/jmespath/go-jmespath v0.4.0 ) diff --git a/service/rds/go.sum b/service/rds/go.sum index 8bce9965be5..616ca36a561 100644 --- a/service/rds/go.sum +++ b/service/rds/go.sum @@ -1,5 +1,5 @@ -github.com/aws/smithy-go v1.11.3 h1:DQixirEFM9IaKxX1olZ3ke3nvxRS2xMDteKIDWxozW8= -github.com/aws/smithy-go v1.11.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 h1:9UJBZTFEmJt/luXhv4jkD5lZDeFUbWE/ZxpF0oAoJc8= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= diff --git a/service/s3/api_client.go b/service/s3/api_client.go index b17db2ae82f..790cc43807b 100644 --- a/service/s3/api_client.go +++ b/service/s3/api_client.go @@ -730,6 +730,9 @@ func (c presignConverter) convertToPresignMiddleware(stack *middleware.Stack, op if err != nil { return err } + if err = smithyhttp.AddNoPayloadDefaultContentTypeRemover(stack); err != nil { + return err + } // add multi-region access point presigner signermv := s3cust.NewPresignHTTPRequestMiddleware(s3cust.PresignHTTPRequestMiddlewareOptions{ diff --git a/service/s3/go.mod b/service/s3/go.mod index b1355ac5770..5a0932ee807 100644 --- a/service/s3/go.mod +++ b/service/s3/go.mod @@ -12,7 +12,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.7 github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.6 github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.6 - github.com/aws/smithy-go v1.11.3 + github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 github.com/google/go-cmp v0.5.8 ) diff --git a/service/s3/go.sum b/service/s3/go.sum index 86cce5bcbcc..3983dc04087 100644 --- a/service/s3/go.sum +++ b/service/s3/go.sum @@ -1,5 +1,5 @@ -github.com/aws/smithy-go v1.11.3 h1:DQixirEFM9IaKxX1olZ3ke3nvxRS2xMDteKIDWxozW8= -github.com/aws/smithy-go v1.11.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 h1:9UJBZTFEmJt/luXhv4jkD5lZDeFUbWE/ZxpF0oAoJc8= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= diff --git a/service/s3/internal/configtesting/go.sum b/service/s3/internal/configtesting/go.sum index 86cce5bcbcc..3983dc04087 100644 --- a/service/s3/internal/configtesting/go.sum +++ b/service/s3/internal/configtesting/go.sum @@ -1,5 +1,5 @@ -github.com/aws/smithy-go v1.11.3 h1:DQixirEFM9IaKxX1olZ3ke3nvxRS2xMDteKIDWxozW8= -github.com/aws/smithy-go v1.11.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 h1:9UJBZTFEmJt/luXhv4jkD5lZDeFUbWE/ZxpF0oAoJc8= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= diff --git a/service/s3/serializers.go b/service/s3/serializers.go index f398aa95c64..126dedcf3b3 100644 --- a/service/s3/serializers.go +++ b/service/s3/serializers.go @@ -135,6 +135,7 @@ func (m *awsRestxml_serializeOpCompleteMultipartUpload) HandleSerialize(ctx cont if input.MultipartUpload != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -540,6 +541,7 @@ func (m *awsRestxml_serializeOpCreateBucket) HandleSerialize(ctx context.Context if input.CreateBucketConfiguration != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -1793,6 +1795,7 @@ func (m *awsRestxml_serializeOpDeleteObjects) HandleSerialize(ctx context.Contex if input.Delete != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -5073,6 +5076,7 @@ func (m *awsRestxml_serializeOpPutBucketAccelerateConfiguration) HandleSerialize if input.AccelerateConfiguration != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -5164,6 +5168,7 @@ func (m *awsRestxml_serializeOpPutBucketAcl) HandleSerialize(ctx context.Context if input.AccessControlPolicy != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -5290,6 +5295,7 @@ func (m *awsRestxml_serializeOpPutBucketAnalyticsConfiguration) HandleSerialize( if input.AnalyticsConfiguration != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -5380,6 +5386,7 @@ func (m *awsRestxml_serializeOpPutBucketCors) HandleSerialize(ctx context.Contex if input.CORSConfiguration != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -5476,6 +5483,7 @@ func (m *awsRestxml_serializeOpPutBucketEncryption) HandleSerialize(ctx context. if input.ServerSideEncryptionConfiguration != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -5572,6 +5580,7 @@ func (m *awsRestxml_serializeOpPutBucketIntelligentTieringConfiguration) HandleS if input.IntelligentTieringConfiguration != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -5657,6 +5666,7 @@ func (m *awsRestxml_serializeOpPutBucketInventoryConfiguration) HandleSerialize( if input.InventoryConfiguration != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -5747,6 +5757,7 @@ func (m *awsRestxml_serializeOpPutBucketLifecycleConfiguration) HandleSerialize( if input.LifecycleConfiguration != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -5838,6 +5849,7 @@ func (m *awsRestxml_serializeOpPutBucketLogging) HandleSerialize(ctx context.Con if input.BucketLoggingStatus != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -5934,6 +5946,7 @@ func (m *awsRestxml_serializeOpPutBucketMetricsConfiguration) HandleSerialize(ct if input.MetricsConfiguration != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -6024,6 +6037,7 @@ func (m *awsRestxml_serializeOpPutBucketNotificationConfiguration) HandleSeriali if input.NotificationConfiguration != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -6115,6 +6129,7 @@ func (m *awsRestxml_serializeOpPutBucketOwnershipControls) HandleSerialize(ctx c if input.OwnershipControls != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -6204,11 +6219,12 @@ func (m *awsRestxml_serializeOpPutBucketPolicy) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } - if input.Policy != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("text/plain") - } + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("text/plain") + } + if input.Policy != nil { payload := strings.NewReader(*input.Policy) if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -6295,6 +6311,7 @@ func (m *awsRestxml_serializeOpPutBucketReplication) HandleSerialize(ctx context if input.ReplicationConfiguration != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -6396,6 +6413,7 @@ func (m *awsRestxml_serializeOpPutBucketRequestPayment) HandleSerialize(ctx cont if input.RequestPaymentConfiguration != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -6492,6 +6510,7 @@ func (m *awsRestxml_serializeOpPutBucketTagging) HandleSerialize(ctx context.Con if input.Tagging != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -6588,6 +6607,7 @@ func (m *awsRestxml_serializeOpPutBucketVersioning) HandleSerialize(ctx context. if input.VersioningConfiguration != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -6689,6 +6709,7 @@ func (m *awsRestxml_serializeOpPutBucketWebsite) HandleSerialize(ctx context.Con if input.WebsiteConfiguration != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -6783,11 +6804,12 @@ func (m *awsRestxml_serializeOpPutObject) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: err} } - if input.Body != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/octet-stream") - } + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/octet-stream") + } + if input.Body != nil { payload := input.Body if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -7037,6 +7059,7 @@ func (m *awsRestxml_serializeOpPutObjectAcl) HandleSerialize(ctx context.Context if input.AccessControlPolicy != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -7181,6 +7204,7 @@ func (m *awsRestxml_serializeOpPutObjectLegalHold) HandleSerialize(ctx context.C if input.LegalHold != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -7295,6 +7319,7 @@ func (m *awsRestxml_serializeOpPutObjectLockConfiguration) HandleSerialize(ctx c if input.ObjectLockConfiguration != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -7401,6 +7426,7 @@ func (m *awsRestxml_serializeOpPutObjectRetention) HandleSerialize(ctx context.C if input.Retention != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -7520,6 +7546,7 @@ func (m *awsRestxml_serializeOpPutObjectTagging) HandleSerialize(ctx context.Con if input.Tagging != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -7634,6 +7661,7 @@ func (m *awsRestxml_serializeOpPutPublicAccessBlock) HandleSerialize(ctx context if input.PublicAccessBlockConfiguration != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -7730,6 +7758,7 @@ func (m *awsRestxml_serializeOpRestoreObject) HandleSerialize(ctx context.Contex if input.RestoreRequest != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -8021,11 +8050,12 @@ func (m *awsRestxml_serializeOpUploadPart) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: err} } - if input.Body != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/octet-stream") - } + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/octet-stream") + } + if input.Body != nil { payload := input.Body if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -8317,11 +8347,12 @@ func (m *awsRestxml_serializeOpWriteGetObjectResponse) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: err} } - if input.Body != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/octet-stream") - } + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/octet-stream") + } + if input.Body != nil { payload := input.Body if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} diff --git a/service/s3control/go.mod b/service/s3control/go.mod index 665a4c8c656..8c1f7300743 100644 --- a/service/s3control/go.mod +++ b/service/s3control/go.mod @@ -7,7 +7,7 @@ require ( github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.12 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.6 github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.6 - github.com/aws/smithy-go v1.11.3 + github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 ) replace github.com/aws/aws-sdk-go-v2 => ../../ diff --git a/service/s3control/go.sum b/service/s3control/go.sum index 86cce5bcbcc..3983dc04087 100644 --- a/service/s3control/go.sum +++ b/service/s3control/go.sum @@ -1,5 +1,5 @@ -github.com/aws/smithy-go v1.11.3 h1:DQixirEFM9IaKxX1olZ3ke3nvxRS2xMDteKIDWxozW8= -github.com/aws/smithy-go v1.11.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 h1:9UJBZTFEmJt/luXhv4jkD5lZDeFUbWE/ZxpF0oAoJc8= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= diff --git a/service/s3control/serializers.go b/service/s3control/serializers.go index acf0de53c2c..85b6c65739d 100644 --- a/service/s3control/serializers.go +++ b/service/s3control/serializers.go @@ -274,6 +274,7 @@ func (m *awsRestxml_serializeOpCreateBucket) HandleSerialize(ctx context.Context if input.CreateBucketConfiguration != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -3468,6 +3469,7 @@ func (m *awsRestxml_serializeOpPutBucketLifecycleConfiguration) HandleSerialize( if input.LifecycleConfiguration != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -3656,6 +3658,7 @@ func (m *awsRestxml_serializeOpPutBucketTagging) HandleSerialize(ctx context.Con if input.Tagging != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } @@ -3942,6 +3945,7 @@ func (m *awsRestxml_serializeOpPutPublicAccessBlock) HandleSerialize(ctx context if input.PublicAccessBlockConfiguration != nil { if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) restEncoder.SetHeader("Content-Type").String("application/xml") } diff --git a/service/sagemakerruntime/go.mod b/service/sagemakerruntime/go.mod index ec615589ee1..85072216775 100644 --- a/service/sagemakerruntime/go.mod +++ b/service/sagemakerruntime/go.mod @@ -6,7 +6,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.16.5 github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.12 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.6 - github.com/aws/smithy-go v1.11.3 + github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 ) replace github.com/aws/aws-sdk-go-v2 => ../../ diff --git a/service/sagemakerruntime/go.sum b/service/sagemakerruntime/go.sum index 86cce5bcbcc..3983dc04087 100644 --- a/service/sagemakerruntime/go.sum +++ b/service/sagemakerruntime/go.sum @@ -1,5 +1,5 @@ -github.com/aws/smithy-go v1.11.3 h1:DQixirEFM9IaKxX1olZ3ke3nvxRS2xMDteKIDWxozW8= -github.com/aws/smithy-go v1.11.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 h1:9UJBZTFEmJt/luXhv4jkD5lZDeFUbWE/ZxpF0oAoJc8= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= diff --git a/service/sagemakerruntime/serializers.go b/service/sagemakerruntime/serializers.go index dcfc523a1fe..a74b5857d85 100644 --- a/service/sagemakerruntime/serializers.go +++ b/service/sagemakerruntime/serializers.go @@ -46,11 +46,12 @@ func (m *awsRestjson1_serializeOpInvokeEndpoint) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: err} } - if input.Body != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/octet-stream") - } + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/octet-stream") + } + if input.Body != nil { payload := bytes.NewReader(input.Body) if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} diff --git a/service/sts/api_client.go b/service/sts/api_client.go index 4bff1dfe229..3041fc467e7 100644 --- a/service/sts/api_client.go +++ b/service/sts/api_client.go @@ -512,6 +512,9 @@ func (c presignConverter) convertToPresignMiddleware(stack *middleware.Stack, op if err != nil { return err } + if err = smithyhttp.AddNoPayloadDefaultContentTypeRemover(stack); err != nil { + return err + } // convert request to a GET request err = query.AddAsGetRequestMiddleware(stack) if err != nil { diff --git a/service/sts/go.mod b/service/sts/go.mod index 6f4f8427651..cdd782976f0 100644 --- a/service/sts/go.mod +++ b/service/sts/go.mod @@ -7,7 +7,7 @@ require ( github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.12 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.6 github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.6 - github.com/aws/smithy-go v1.11.3 + github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 ) replace github.com/aws/aws-sdk-go-v2 => ../../ diff --git a/service/sts/go.sum b/service/sts/go.sum index 86cce5bcbcc..3983dc04087 100644 --- a/service/sts/go.sum +++ b/service/sts/go.sum @@ -1,5 +1,5 @@ -github.com/aws/smithy-go v1.11.3 h1:DQixirEFM9IaKxX1olZ3ke3nvxRS2xMDteKIDWxozW8= -github.com/aws/smithy-go v1.11.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864 h1:9UJBZTFEmJt/luXhv4jkD5lZDeFUbWE/ZxpF0oAoJc8= +github.com/aws/smithy-go v1.11.4-0.20220627193811-996fd06fc864/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=