diff --git a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AwsGoDependency.java b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AwsGoDependency.java index 61f7de2fb13..7241322c1ab 100644 --- a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AwsGoDependency.java +++ b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AwsGoDependency.java @@ -53,16 +53,18 @@ protected static GoDependency aws(String relativePath, String alias) { * * @param moduleImportPath the module path within aws sdk to be added as go mod dependency. * @param relativePath the relative path which will be used as import path relative to aws sdk path. + * @param version the version of the aws module dependency to be imported * @param alias the go import alias. * @return GoDependency */ protected static GoDependency awsModuleDep( String moduleImportPath, String relativePath, + String version, String alias ) { moduleImportPath = AWS_SOURCE_PATH+ "/" + moduleImportPath; - return module(moduleImportPath, relativePath, Versions.AWS_SDK, alias); + return module(moduleImportPath, relativePath, version, alias); } protected static GoDependency module( @@ -79,6 +81,6 @@ protected static GoDependency module( } private static final class Versions { - private static final String AWS_SDK = "v0.0.0-20200928200900-9b4f334f82b2"; + private static final String AWS_SDK = "v0.25.0"; } } diff --git a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/customization/AwsCustomGoDependency.java b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/customization/AwsCustomGoDependency.java index c79abb7ba88..47737512477 100644 --- a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/customization/AwsCustomGoDependency.java +++ b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/customization/AwsCustomGoDependency.java @@ -29,10 +29,18 @@ public final class AwsCustomGoDependency extends AwsGoDependency { "service/apigateway/internal/customizations", "agcust"); public static final GoDependency GLACIER_CUSTOMIZATION = aws( "service/glacier/internal/customizations", "glaciercust"); + public static final GoDependency S3_SHARED_CUSTOMIZATION = awsModuleDep( - "service/internal/s3shared", null, "s3shared"); + "service/internal/s3shared", null, Versions.INTERNAL_S3SHARED, "s3shared"); + public static final GoDependency ACCEPT_ENCODING_CUSTOMIZATION = awsModuleDep( + "service/internal/accept-encoding", null, Versions.INTERNAL_ACCEPTENCODING, "acceptencodingcust"); private AwsCustomGoDependency() { super(); } + + private static final class Versions { + private static final String INTERNAL_S3SHARED = "v0.1.0"; + private static final String INTERNAL_ACCEPTENCODING = "v0.0.0-20200930084954-897dfb99530c"; + } } diff --git a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/customization/DynamoDBValidateResponseChecksum.java b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/customization/DynamoDBValidateResponseChecksum.java index 4720a449b55..32f3b2caacc 100644 --- a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/customization/DynamoDBValidateResponseChecksum.java +++ b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/customization/DynamoDBValidateResponseChecksum.java @@ -82,9 +82,9 @@ private void writeMiddlewareHelper(GoWriter writer) { writer.openBlock("func $L(stack *middleware.Stack, options Options) {", "}", GZIP_ADDER, () -> { writer.write("$T(stack, $T{Enable: options.$L})", SymbolUtils.createValueSymbolBuilder(GZIP_INTERNAL_ADDER, - AwsCustomGoDependency.DYNAMODB_CUSTOMIZATION).build(), + AwsCustomGoDependency.ACCEPT_ENCODING_CUSTOMIZATION).build(), SymbolUtils.createValueSymbolBuilder(GZIP_INTERNAL_ADDER + "Options", - AwsCustomGoDependency.DYNAMODB_CUSTOMIZATION).build(), + AwsCustomGoDependency.ACCEPT_ENCODING_CUSTOMIZATION).build(), GZIP_CLIENT_OPTION ); }); diff --git a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/customization/S3AcceptEncodingGzip.java b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/customization/S3AcceptEncodingGzip.java new file mode 100644 index 00000000000..a792e651c00 --- /dev/null +++ b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/customization/S3AcceptEncodingGzip.java @@ -0,0 +1,98 @@ +package software.amazon.smithy.aws.go.codegen.customization; + +import java.util.List; +import java.util.logging.Logger; +import software.amazon.smithy.aws.go.codegen.AddAwsConfigFields; +import software.amazon.smithy.aws.traits.ServiceTrait; +import software.amazon.smithy.codegen.core.SymbolProvider; +import software.amazon.smithy.go.codegen.GoDelegator; +import software.amazon.smithy.go.codegen.GoSettings; +import software.amazon.smithy.go.codegen.GoWriter; +import software.amazon.smithy.go.codegen.SymbolUtils; +import software.amazon.smithy.go.codegen.integration.ConfigField; +import software.amazon.smithy.go.codegen.integration.GoIntegration; +import software.amazon.smithy.go.codegen.integration.MiddlewareRegistrar; +import software.amazon.smithy.go.codegen.integration.RuntimeClientPlugin; +import software.amazon.smithy.model.Model; +import software.amazon.smithy.model.shapes.ServiceShape; +import software.amazon.smithy.utils.ListUtils; + +/** + * S3AcceptEncodingGzip adds a customization for s3 client to disable + * auto decoding of GZip content by Golang HTTP Client. + * + * This customization provides an option on the S3 client options to enable + * AcceptEncoding for GZIP. The flag if set, will enable auto decompression of + * GZIP by the S3 Client. + * + * By default, the client's auto decompression of GZIP content is turned off. + */ +public class S3AcceptEncodingGzip implements GoIntegration { + private static final Logger LOGGER = Logger.getLogger(AddAwsConfigFields.class.getName()); + + private static final String GZIP_DISABLE = "disableAcceptEncodingGzip"; + private static final String GZIP_INTERNAL_ADDER = "AddAcceptEncodingGzip"; + + /** + * Gets the sort order of the customization from -128 to 127, with lowest + * executed first. + * + * @return Returns the sort order, defaults to -50. + */ + @Override + public byte getOrder() { + return 127; + } + + @Override + public void writeAdditionalFiles( + GoSettings settings, + Model model, + SymbolProvider symbolProvider, + GoDelegator goDelegator + ) { + if (!isServiceS3(model, settings.getService(model))) { + return; + } + + goDelegator.useShapeWriter(settings.getService(model), this::writeMiddlewareHelper); + } + + private void writeMiddlewareHelper(GoWriter writer) { + writer.openBlock("func $L(stack *middleware.Stack) {", "}", GZIP_DISABLE, () -> { + writer.write("$T(stack, $T{})", + SymbolUtils.createValueSymbolBuilder(GZIP_INTERNAL_ADDER, + AwsCustomGoDependency.ACCEPT_ENCODING_CUSTOMIZATION).build(), + SymbolUtils.createValueSymbolBuilder(GZIP_INTERNAL_ADDER + "Options", + AwsCustomGoDependency.ACCEPT_ENCODING_CUSTOMIZATION).build() + ); + }); + writer.insertTrailingNewline(); + } + + @Override + public List getClientPlugins() { + return ListUtils.of( + // register disableAcceptEncodingGzip middleware + RuntimeClientPlugin.builder() + .servicePredicate(S3AcceptEncodingGzip::isServiceS3) + .registerMiddleware(MiddlewareRegistrar.builder() + .resolvedFunction(SymbolUtils.createValueSymbolBuilder(GZIP_DISABLE) + .build()) + .build() + ) + .build() + ); + } + + /** + * Return true if service is S3. + * + * @param model the model used for generation. + * @param service the service shape for which default HTTP Client is generated. + * @return true if service is S3 + */ + private static boolean isServiceS3(Model model, ServiceShape service) { + return service.expectTrait(ServiceTrait.class).getSdkId().equalsIgnoreCase("S3"); + } +} diff --git a/codegen/smithy-aws-go-codegen/src/main/resources/META-INF/services/software.amazon.smithy.go.codegen.integration.GoIntegration b/codegen/smithy-aws-go-codegen/src/main/resources/META-INF/services/software.amazon.smithy.go.codegen.integration.GoIntegration index d843b0d4ce5..fc4380e302d 100644 --- a/codegen/smithy-aws-go-codegen/src/main/resources/META-INF/services/software.amazon.smithy.go.codegen.integration.GoIntegration +++ b/codegen/smithy-aws-go-codegen/src/main/resources/META-INF/services/software.amazon.smithy.go.codegen.integration.GoIntegration @@ -17,4 +17,5 @@ software.amazon.smithy.aws.go.codegen.customization.GlacierCustomizations software.amazon.smithy.aws.go.codegen.customization.S3ResponseErrorWrapper software.amazon.smithy.aws.go.codegen.customization.S3MetadataRetriever software.amazon.smithy.aws.go.codegen.customization.S3ContentSHA256Header -software.amazon.smithy.aws.go.codegen.customization.BackfillS3ObjectSizeMemberShapeType \ No newline at end of file +software.amazon.smithy.aws.go.codegen.customization.BackfillS3ObjectSizeMemberShapeType +software.amazon.smithy.aws.go.codegen.customization.S3AcceptEncodingGzip diff --git a/service/dynamodb/api_client.go b/service/dynamodb/api_client.go index db1f4df36c6..2aa714cdc1d 100644 --- a/service/dynamodb/api_client.go +++ b/service/dynamodb/api_client.go @@ -11,6 +11,7 @@ import ( "github.com/aws/aws-sdk-go-v2/aws/signer/v4" awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" ddbcust "github.com/aws/aws-sdk-go-v2/service/dynamodb/internal/customizations" + acceptencodingcust "github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding" "github.com/awslabs/smithy-go/middleware" smithyrand "github.com/awslabs/smithy-go/rand" "net/http" @@ -234,5 +235,5 @@ func addValidateResponseChecksum(stack *middleware.Stack, options Options) { } func addAcceptEncodingGzip(stack *middleware.Stack, options Options) { - ddbcust.AddAcceptEncodingGzip(stack, ddbcust.AddAcceptEncodingGzipOptions{Enable: options.EnableAcceptEncodingGzip}) + acceptencodingcust.AddAcceptEncodingGzip(stack, acceptencodingcust.AddAcceptEncodingGzipOptions{Enable: options.EnableAcceptEncodingGzip}) } diff --git a/service/dynamodb/go.mod b/service/dynamodb/go.mod index e7cfbfaf0ef..da60f03c62a 100644 --- a/service/dynamodb/go.mod +++ b/service/dynamodb/go.mod @@ -4,7 +4,10 @@ go 1.15 require ( github.com/aws/aws-sdk-go-v2 v0.25.0 + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v0.0.0-20200930084954-897dfb99530c github.com/awslabs/smithy-go v0.1.0 ) replace github.com/aws/aws-sdk-go-v2 => ../../ + +replace github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding => ../../service/internal/accept-encoding/ diff --git a/service/dynamodb/internal/customizations/doc.go b/service/dynamodb/internal/customizations/doc.go index 891c87e8513..765e424b9b7 100644 --- a/service/dynamodb/internal/customizations/doc.go +++ b/service/dynamodb/internal/customizations/doc.go @@ -1,47 +1,41 @@ -// Package customizations provides customizations for the Amazon DynamoDB API client. -// -// The DynamoDB API client uses two customizations, response checksum validation, -// and manual content-encoding: gzip support. -// -// Middleware layering -// -// Checksum validation needs to be performed first in deserialization chain -// on top of gzip decompression. Since the behavior of Deserialization is -// in reverse order to the other stack steps its easier to consider that -// "after" means "before". -// -// HTTP Response -> Checksum -> gzip decompress -> deserialize -// -// Response checksum validation -// -// DynamoDB responses can include a X-Amz-Crc32 header with the CRC32 checksum -// value of the response body. If the response body is content-encoding: gzip, the -// checksum is of the gzipped response content. -// -// If the header is present, the SDK should validate that the response payload -// computed CRC32 checksum matches the value provided in the header. The checksum -// header is based on the original payload provided returned by the service. Which -// means that if the response is gzipped the checksum is of the gzipped response, -// not the decompressed response bytes. -// -// Customization option: -// DisableValidateResponseChecksum (Enabled by Default) -// -// Accept encoding gzip -// -// The Go HTTP client automatically supports accept-encoding and content-encoding -// gzip by default. This default behavior is not desired by the SDK, and prevents -// validating the response body's checksum. To prevent this the SDK must manually -// control usage of content-encoding gzip. -// -// To control content-encoding, the SDK must always set the `Accept-Encoding` -// header to a value. This prevents the HTTP client from using gzip automatically. -// When gzip is enabled on the API client, the SDK's customization will control -// decompressing the gzip data in order to not break the checksum validation. When -// gzip is disabled, the API client will disable gzip, preventing the HTTP -// client's default behavior. -// -// Customization option: -// EnableAcceptEncodingGzip (Disabled by Default) -// +/* +Package customizations provides customizations for the Amazon DynamoDB API client. + +The DynamoDB API client uses two customizations, response checksum validation, +and manual content-encoding: gzip support. + +Middleware layering + +Checksum validation needs to be performed first in deserialization chain +on top of gzip decompression. Since the behavior of Deserialization is +in reverse order to the other stack steps its easier to consider that +"after" means "before". + + HTTP Response -> Checksum -> gzip decompress -> deserialize + +Response checksum validation + +DynamoDB responses can include a X-Amz-Crc32 header with the CRC32 checksum +value of the response body. If the response body is content-encoding: gzip, the +checksum is of the gzipped response content. + +If the header is present, the SDK should validate that the response payload +computed CRC32 checksum matches the value provided in the header. The checksum +header is based on the original payload provided returned by the service. Which +means that if the response is gzipped the checksum is of the gzipped response, +not the decompressed response bytes. + +Customization option: + DisableValidateResponseChecksum (Enabled by Default) + +Accept encoding gzip + +For customization around accept encoding, dynamodb client uses the middlewares +defined at service/internal/accept-encoding. Please refer to the documentation for +`accept-encoding` package for more details. + +Customization option: + EnableAcceptEncodingGzip (Disabled by Default) + +*/ package customizations diff --git a/service/dynamodb/internal/customizations/accept_encoding_gzip.go b/service/internal/accept-encoding/accept_encoding_gzip.go similarity index 82% rename from service/dynamodb/internal/customizations/accept_encoding_gzip.go rename to service/internal/accept-encoding/accept_encoding_gzip.go index 760bfe42e36..91b30dfdcbb 100644 --- a/service/dynamodb/internal/customizations/accept_encoding_gzip.go +++ b/service/internal/accept-encoding/accept_encoding_gzip.go @@ -1,4 +1,4 @@ -package customizations +package acceptencoding import ( "compress/gzip" @@ -6,7 +6,7 @@ import ( "fmt" "io" - smithy "github.com/awslabs/smithy-go" + "github.com/awslabs/smithy-go" "github.com/awslabs/smithy-go/middleware" smithyhttp "github.com/awslabs/smithy-go/transport/http" ) @@ -25,26 +25,26 @@ type AddAcceptEncodingGzipOptions struct { // computed without disabling GZIP support. func AddAcceptEncodingGzip(stack *middleware.Stack, options AddAcceptEncodingGzipOptions) { if options.Enable { - stack.Finalize.Add(&AcceptEncodingGzipMiddleware{}, middleware.Before) + stack.Finalize.Add(&EnableGzipMiddleware{}, middleware.Before) stack.Deserialize.Insert(&DecompressGzipMiddleware{}, "OperationDeserializer", middleware.After) return } - stack.Finalize.Add(&DisableAcceptEncodingGzipMiddleware{}, middleware.Before) + stack.Finalize.Add(&DisableGzipMiddleware{}, middleware.Before) } -// DisableAcceptEncodingGzipMiddleware provides the middleware that will +// DisableGzipMiddleware provides the middleware that will // disable the underlying http client automatically enabling for gzip // decompress content-encoding support. -type DisableAcceptEncodingGzipMiddleware struct{} +type DisableGzipMiddleware struct{} // ID returns the id for the middleware. -func (*DisableAcceptEncodingGzipMiddleware) ID() string { - return "DynamoDB:DisableAcceptEncodingGzipMiddleware" +func (*DisableGzipMiddleware) ID() string { + return "DisableAcceptEncodingGzipMiddleware" } -// HandleFinalize implements the FinalizeMiddlware interface. -func (*DisableAcceptEncodingGzipMiddleware) HandleFinalize( +// HandleFinalize implements the FinalizeMiddleware interface. +func (*DisableGzipMiddleware) HandleFinalize( ctx context.Context, input middleware.FinalizeInput, next middleware.FinalizeHandler, ) ( output middleware.FinalizeOutput, metadata middleware.Metadata, err error, @@ -63,16 +63,16 @@ func (*DisableAcceptEncodingGzipMiddleware) HandleFinalize( return next.HandleFinalize(ctx, input) } -// AcceptEncodingGzipMiddleware provides a middleware to enable support for +// EnableGzipMiddleware provides a middleware to enable support for // gzip responses, with manual decompression. This prevents the underlying HTTP // client from performing the gzip decompression automatically. -type AcceptEncodingGzipMiddleware struct{} +type EnableGzipMiddleware struct{} // ID returns the id for the middleware. -func (*AcceptEncodingGzipMiddleware) ID() string { return "DynamoDB:AcceptEncodingGzipMiddleware" } +func (*EnableGzipMiddleware) ID() string { return "AcceptEncodingGzipMiddleware" } // HandleFinalize implements the FinalizeMiddlware interface. -func (*AcceptEncodingGzipMiddleware) HandleFinalize( +func (*EnableGzipMiddleware) HandleFinalize( ctx context.Context, input middleware.FinalizeInput, next middleware.FinalizeHandler, ) ( output middleware.FinalizeOutput, metadata middleware.Metadata, err error, @@ -96,7 +96,7 @@ func (*AcceptEncodingGzipMiddleware) HandleFinalize( type DecompressGzipMiddleware struct{} // ID returns the id for the middleware. -func (*DecompressGzipMiddleware) ID() string { return "DynamoDB:DecompressGzipMiddleware" } +func (*DecompressGzipMiddleware) ID() string { return "DecompressGzipMiddleware" } // HandleDeserialize implements the DeserializeMiddlware interface. func (*DecompressGzipMiddleware) HandleDeserialize( diff --git a/service/dynamodb/internal/customizations/accept_encoding_gzip_test.go b/service/internal/accept-encoding/accept_encoding_gzip_test.go similarity index 92% rename from service/dynamodb/internal/customizations/accept_encoding_gzip_test.go rename to service/internal/accept-encoding/accept_encoding_gzip_test.go index acc0e274fe6..ce8d4c16ac8 100644 --- a/service/dynamodb/internal/customizations/accept_encoding_gzip_test.go +++ b/service/internal/accept-encoding/accept_encoding_gzip_test.go @@ -1,4 +1,4 @@ -package customizations +package acceptencoding import ( "bytes" @@ -42,7 +42,7 @@ func TestAddAcceptEncodingGzip(t *testing.T) { } if c.Enable { - id = (*AcceptEncodingGzipMiddleware)(nil).ID() + id = (*EnableGzipMiddleware)(nil).ID() if m, ok := stack.Finalize.Get(id); !ok || m == nil { t.Fatalf("expect %s to be present.", id) } @@ -53,7 +53,7 @@ func TestAddAcceptEncodingGzip(t *testing.T) { } return } - id = (*AcceptEncodingGzipMiddleware)(nil).ID() + id = (*EnableGzipMiddleware)(nil).ID() if m, ok := stack.Finalize.Get(id); ok || m != nil { t.Fatalf("expect %s not to be present.", id) } @@ -67,7 +67,7 @@ func TestAddAcceptEncodingGzip(t *testing.T) { } func TestAcceptEncodingGzipMiddleware(t *testing.T) { - m := &AcceptEncodingGzipMiddleware{} + m := &EnableGzipMiddleware{} _, _, err := m.HandleFinalize(context.Background(), middleware.FinalizeInput{ @@ -196,3 +196,20 @@ func (*stubOpDeserializer) HandleDeserialize( ) { return next.HandleDeserialize(ctx, input) } + +type wasClosedReadCloser struct { + io.Reader + closed bool +} + +func (c *wasClosedReadCloser) WasClosed() bool { + return c.closed +} + +func (c *wasClosedReadCloser) Close() error { + c.closed = true + if v, ok := c.Reader.(io.Closer); ok { + return v.Close() + } + return nil +} diff --git a/service/internal/accept-encoding/doc.go b/service/internal/accept-encoding/doc.go new file mode 100644 index 00000000000..3ffac01315d --- /dev/null +++ b/service/internal/accept-encoding/doc.go @@ -0,0 +1,23 @@ +/* +Package acceptencoding provides customizations associated with Accept Encoding Header. + +Accept encoding gzip + +The Go HTTP client automatically supports accept-encoding and content-encoding +gzip by default. This default behavior is not desired by the SDK, and prevents +validating the response body's checksum. To prevent this the SDK must manually +control usage of content-encoding gzip. + +To control content-encoding, the SDK must always set the `Accept-Encoding` +header to a value. This prevents the HTTP client from using gzip automatically. +When gzip is enabled on the API client, the SDK's customization will control +decompressing the gzip data in order to not break the checksum validation. When +gzip is disabled, the API client will disable gzip, preventing the HTTP +client's default behavior. + +An `EnableAcceptEncodingGzip` option may or may not be present depending on the client using +the below middleware. The option if present can be used to enable auto decompressing +gzip by the SDK. + +*/ +package acceptencoding diff --git a/service/internal/accept-encoding/go.mod b/service/internal/accept-encoding/go.mod new file mode 100644 index 00000000000..d737262f09d --- /dev/null +++ b/service/internal/accept-encoding/go.mod @@ -0,0 +1,5 @@ +module github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding + +go 1.15 + +require github.com/awslabs/smithy-go v0.1.0 diff --git a/service/internal/accept-encoding/go.sum b/service/internal/accept-encoding/go.sum new file mode 100644 index 00000000000..158aec8f539 --- /dev/null +++ b/service/internal/accept-encoding/go.sum @@ -0,0 +1,6 @@ +github.com/awslabs/smithy-go v0.1.0 h1:yltioxA96yA1Fv+fE+5FFXnbFgw3ngpeEV++TUUktiM= +github.com/awslabs/smithy-go v0.1.0/go.mod h1:hPOQwnmBLHsUphH13tVSjQhTAFma0/0XoZGbBcOuABI= +github.com/google/go-cmp v0.4.1 h1:/exdXoGamhu5ONeUJH0deniYLWYvQwW66yvlfiiKTu0= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/service/s3/api_client.go b/service/s3/api_client.go index 9ded66d08c7..b9b102da122 100644 --- a/service/s3/api_client.go +++ b/service/s3/api_client.go @@ -8,6 +8,7 @@ import ( awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/retry" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + acceptencodingcust "github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding" "github.com/aws/aws-sdk-go-v2/service/internal/s3shared" s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations" "github.com/awslabs/smithy-go/middleware" @@ -360,3 +361,7 @@ func addResponseErrorMiddleware(stack *middleware.Stack) { func addMetadataRetrieverMiddleware(stack *middleware.Stack) { s3shared.AddMetadataRetrieverMiddleware(stack) } + +func disableAcceptEncodingGzip(stack *middleware.Stack) { + acceptencodingcust.AddAcceptEncodingGzip(stack, acceptencodingcust.AddAcceptEncodingGzipOptions{}) +} diff --git a/service/s3/api_op_AbortMultipartUpload.go b/service/s3/api_op_AbortMultipartUpload.go index fc385b2fb35..a16d5958db1 100644 --- a/service/s3/api_op_AbortMultipartUpload.go +++ b/service/s3/api_op_AbortMultipartUpload.go @@ -60,6 +60,7 @@ func (c *Client) AbortMultipartUpload(ctx context.Context, params *AbortMultipar addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_CompleteMultipartUpload.go b/service/s3/api_op_CompleteMultipartUpload.go index 10719628df6..ef39ae5779f 100644 --- a/service/s3/api_op_CompleteMultipartUpload.go +++ b/service/s3/api_op_CompleteMultipartUpload.go @@ -80,6 +80,7 @@ func (c *Client) CompleteMultipartUpload(ctx context.Context, params *CompleteMu addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_CopyObject.go b/service/s3/api_op_CopyObject.go index 7469233cb07..f51ddb65080 100644 --- a/service/s3/api_op_CopyObject.go +++ b/service/s3/api_op_CopyObject.go @@ -152,6 +152,7 @@ func (c *Client) CopyObject(ctx context.Context, params *CopyObjectInput, optFns addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_CreateBucket.go b/service/s3/api_op_CreateBucket.go index e996b6e558d..8a87cc1c5f8 100644 --- a/service/s3/api_op_CreateBucket.go +++ b/service/s3/api_op_CreateBucket.go @@ -119,6 +119,7 @@ func (c *Client) CreateBucket(ctx context.Context, params *CreateBucketInput, op addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_CreateMultipartUpload.go b/service/s3/api_op_CreateMultipartUpload.go index 7326aed6957..f9028e82aad 100644 --- a/service/s3/api_op_CreateMultipartUpload.go +++ b/service/s3/api_op_CreateMultipartUpload.go @@ -175,6 +175,7 @@ func (c *Client) CreateMultipartUpload(ctx context.Context, params *CreateMultip addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_DeleteBucket.go b/service/s3/api_op_DeleteBucket.go index 20b1f2f4cd1..de300337605 100644 --- a/service/s3/api_op_DeleteBucket.go +++ b/service/s3/api_op_DeleteBucket.go @@ -39,6 +39,7 @@ func (c *Client) DeleteBucket(ctx context.Context, params *DeleteBucketInput, op addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_DeleteBucketAnalyticsConfiguration.go b/service/s3/api_op_DeleteBucketAnalyticsConfiguration.go index c42359ed3cb..a3c3c3e11a3 100644 --- a/service/s3/api_op_DeleteBucketAnalyticsConfiguration.go +++ b/service/s3/api_op_DeleteBucketAnalyticsConfiguration.go @@ -49,6 +49,7 @@ func (c *Client) DeleteBucketAnalyticsConfiguration(ctx context.Context, params addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_DeleteBucketCors.go b/service/s3/api_op_DeleteBucketCors.go index b2de38efa81..0a879c52830 100644 --- a/service/s3/api_op_DeleteBucketCors.go +++ b/service/s3/api_op_DeleteBucketCors.go @@ -42,6 +42,7 @@ func (c *Client) DeleteBucketCors(ctx context.Context, params *DeleteBucketCorsI addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_DeleteBucketEncryption.go b/service/s3/api_op_DeleteBucketEncryption.go index bcbe27b271d..0fa805283dc 100644 --- a/service/s3/api_op_DeleteBucketEncryption.go +++ b/service/s3/api_op_DeleteBucketEncryption.go @@ -50,6 +50,7 @@ func (c *Client) DeleteBucketEncryption(ctx context.Context, params *DeleteBucke addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_DeleteBucketInventoryConfiguration.go b/service/s3/api_op_DeleteBucketInventoryConfiguration.go index 11c0da4897c..0e2ae5b7d6d 100644 --- a/service/s3/api_op_DeleteBucketInventoryConfiguration.go +++ b/service/s3/api_op_DeleteBucketInventoryConfiguration.go @@ -55,6 +55,7 @@ func (c *Client) DeleteBucketInventoryConfiguration(ctx context.Context, params addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_DeleteBucketLifecycle.go b/service/s3/api_op_DeleteBucketLifecycle.go index 76753009e23..d9310f4718b 100644 --- a/service/s3/api_op_DeleteBucketLifecycle.go +++ b/service/s3/api_op_DeleteBucketLifecycle.go @@ -49,6 +49,7 @@ func (c *Client) DeleteBucketLifecycle(ctx context.Context, params *DeleteBucket addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_DeleteBucketMetricsConfiguration.go b/service/s3/api_op_DeleteBucketMetricsConfiguration.go index ebb1bc54ce2..80ad875b2a6 100644 --- a/service/s3/api_op_DeleteBucketMetricsConfiguration.go +++ b/service/s3/api_op_DeleteBucketMetricsConfiguration.go @@ -54,6 +54,7 @@ func (c *Client) DeleteBucketMetricsConfiguration(ctx context.Context, params *D addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_DeleteBucketPolicy.go b/service/s3/api_op_DeleteBucketPolicy.go index b0f619c0d67..fd6e5d41723 100644 --- a/service/s3/api_op_DeleteBucketPolicy.go +++ b/service/s3/api_op_DeleteBucketPolicy.go @@ -55,6 +55,7 @@ func (c *Client) DeleteBucketPolicy(ctx context.Context, params *DeleteBucketPol addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_DeleteBucketReplication.go b/service/s3/api_op_DeleteBucketReplication.go index e4be0bbaa9a..e7aa529a943 100644 --- a/service/s3/api_op_DeleteBucketReplication.go +++ b/service/s3/api_op_DeleteBucketReplication.go @@ -50,6 +50,7 @@ func (c *Client) DeleteBucketReplication(ctx context.Context, params *DeleteBuck addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_DeleteBucketTagging.go b/service/s3/api_op_DeleteBucketTagging.go index b540c156539..b6c9323fa81 100644 --- a/service/s3/api_op_DeleteBucketTagging.go +++ b/service/s3/api_op_DeleteBucketTagging.go @@ -41,6 +41,7 @@ func (c *Client) DeleteBucketTagging(ctx context.Context, params *DeleteBucketTa addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_DeleteBucketWebsite.go b/service/s3/api_op_DeleteBucketWebsite.go index 3d3165c6437..be28d917323 100644 --- a/service/s3/api_op_DeleteBucketWebsite.go +++ b/service/s3/api_op_DeleteBucketWebsite.go @@ -50,6 +50,7 @@ func (c *Client) DeleteBucketWebsite(ctx context.Context, params *DeleteBucketWe addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_DeleteObject.go b/service/s3/api_op_DeleteObject.go index 7285c7b7b99..05de61e6b89 100644 --- a/service/s3/api_op_DeleteObject.go +++ b/service/s3/api_op_DeleteObject.go @@ -59,6 +59,7 @@ func (c *Client) DeleteObject(ctx context.Context, params *DeleteObjectInput, op addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_DeleteObjectTagging.go b/service/s3/api_op_DeleteObjectTagging.go index 61733eb542f..5edef62a418 100644 --- a/service/s3/api_op_DeleteObjectTagging.go +++ b/service/s3/api_op_DeleteObjectTagging.go @@ -46,6 +46,7 @@ func (c *Client) DeleteObjectTagging(ctx context.Context, params *DeleteObjectTa addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_DeleteObjects.go b/service/s3/api_op_DeleteObjects.go index 6afe0c5334f..ebd79ba495b 100644 --- a/service/s3/api_op_DeleteObjects.go +++ b/service/s3/api_op_DeleteObjects.go @@ -65,6 +65,7 @@ func (c *Client) DeleteObjects(ctx context.Context, params *DeleteObjectsInput, addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_DeletePublicAccessBlock.go b/service/s3/api_op_DeletePublicAccessBlock.go index e9a92080895..dd75be85cb2 100644 --- a/service/s3/api_op_DeletePublicAccessBlock.go +++ b/service/s3/api_op_DeletePublicAccessBlock.go @@ -48,6 +48,7 @@ func (c *Client) DeletePublicAccessBlock(ctx context.Context, params *DeletePubl addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_GetBucketAccelerateConfiguration.go b/service/s3/api_op_GetBucketAccelerateConfiguration.go index be1f17e2fca..950ef6d5cf6 100644 --- a/service/s3/api_op_GetBucketAccelerateConfiguration.go +++ b/service/s3/api_op_GetBucketAccelerateConfiguration.go @@ -57,6 +57,7 @@ func (c *Client) GetBucketAccelerateConfiguration(ctx context.Context, params *G addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_GetBucketAcl.go b/service/s3/api_op_GetBucketAcl.go index 058f349ca60..9e330de8e6e 100644 --- a/service/s3/api_op_GetBucketAcl.go +++ b/service/s3/api_op_GetBucketAcl.go @@ -42,6 +42,7 @@ func (c *Client) GetBucketAcl(ctx context.Context, params *GetBucketAclInput, op addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_GetBucketAnalyticsConfiguration.go b/service/s3/api_op_GetBucketAnalyticsConfiguration.go index 7572c387765..efff2be0291 100644 --- a/service/s3/api_op_GetBucketAnalyticsConfiguration.go +++ b/service/s3/api_op_GetBucketAnalyticsConfiguration.go @@ -51,6 +51,7 @@ func (c *Client) GetBucketAnalyticsConfiguration(ctx context.Context, params *Ge addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_GetBucketCors.go b/service/s3/api_op_GetBucketCors.go index 1d6b646a40d..5ae0a4cc270 100644 --- a/service/s3/api_op_GetBucketCors.go +++ b/service/s3/api_op_GetBucketCors.go @@ -44,6 +44,7 @@ func (c *Client) GetBucketCors(ctx context.Context, params *GetBucketCorsInput, addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_GetBucketEncryption.go b/service/s3/api_op_GetBucketEncryption.go index 83d8ac42354..ce1d0e88bbc 100644 --- a/service/s3/api_op_GetBucketEncryption.go +++ b/service/s3/api_op_GetBucketEncryption.go @@ -51,6 +51,7 @@ func (c *Client) GetBucketEncryption(ctx context.Context, params *GetBucketEncry addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_GetBucketInventoryConfiguration.go b/service/s3/api_op_GetBucketInventoryConfiguration.go index ddba3b44860..6cee2354f4e 100644 --- a/service/s3/api_op_GetBucketInventoryConfiguration.go +++ b/service/s3/api_op_GetBucketInventoryConfiguration.go @@ -52,6 +52,7 @@ func (c *Client) GetBucketInventoryConfiguration(ctx context.Context, params *Ge addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_GetBucketLifecycleConfiguration.go b/service/s3/api_op_GetBucketLifecycleConfiguration.go index 50940df7827..62ac735500c 100644 --- a/service/s3/api_op_GetBucketLifecycleConfiguration.go +++ b/service/s3/api_op_GetBucketLifecycleConfiguration.go @@ -61,6 +61,7 @@ func (c *Client) GetBucketLifecycleConfiguration(ctx context.Context, params *Ge addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_GetBucketLocation.go b/service/s3/api_op_GetBucketLocation.go index 135e1e3cd0d..952d763ccf0 100644 --- a/service/s3/api_op_GetBucketLocation.go +++ b/service/s3/api_op_GetBucketLocation.go @@ -42,6 +42,7 @@ func (c *Client) GetBucketLocation(ctx context.Context, params *GetBucketLocatio addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_GetBucketLogging.go b/service/s3/api_op_GetBucketLogging.go index 3d4ec62c1ec..70be3aec389 100644 --- a/service/s3/api_op_GetBucketLogging.go +++ b/service/s3/api_op_GetBucketLogging.go @@ -41,6 +41,7 @@ func (c *Client) GetBucketLogging(ctx context.Context, params *GetBucketLoggingI addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_GetBucketMetricsConfiguration.go b/service/s3/api_op_GetBucketMetricsConfiguration.go index 6cafcc8be08..b5189f21f87 100644 --- a/service/s3/api_op_GetBucketMetricsConfiguration.go +++ b/service/s3/api_op_GetBucketMetricsConfiguration.go @@ -55,6 +55,7 @@ func (c *Client) GetBucketMetricsConfiguration(ctx context.Context, params *GetB addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_GetBucketNotificationConfiguration.go b/service/s3/api_op_GetBucketNotificationConfiguration.go index 92e511eb08e..c43185b945b 100644 --- a/service/s3/api_op_GetBucketNotificationConfiguration.go +++ b/service/s3/api_op_GetBucketNotificationConfiguration.go @@ -50,6 +50,7 @@ func (c *Client) GetBucketNotificationConfiguration(ctx context.Context, params addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_GetBucketPolicy.go b/service/s3/api_op_GetBucketPolicy.go index 5da58debead..9487de63688 100644 --- a/service/s3/api_op_GetBucketPolicy.go +++ b/service/s3/api_op_GetBucketPolicy.go @@ -51,6 +51,7 @@ func (c *Client) GetBucketPolicy(ctx context.Context, params *GetBucketPolicyInp addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_GetBucketPolicyStatus.go b/service/s3/api_op_GetBucketPolicyStatus.go index 0cb12977bf2..e9b9ae38af6 100644 --- a/service/s3/api_op_GetBucketPolicyStatus.go +++ b/service/s3/api_op_GetBucketPolicyStatus.go @@ -49,6 +49,7 @@ func (c *Client) GetBucketPolicyStatus(ctx context.Context, params *GetBucketPol addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_GetBucketReplication.go b/service/s3/api_op_GetBucketReplication.go index 4fd3dcc8417..bf8ccff7769 100644 --- a/service/s3/api_op_GetBucketReplication.go +++ b/service/s3/api_op_GetBucketReplication.go @@ -53,6 +53,7 @@ func (c *Client) GetBucketReplication(ctx context.Context, params *GetBucketRepl addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_GetBucketRequestPayment.go b/service/s3/api_op_GetBucketRequestPayment.go index 2ec825428ed..291d7cfb31e 100644 --- a/service/s3/api_op_GetBucketRequestPayment.go +++ b/service/s3/api_op_GetBucketRequestPayment.go @@ -43,6 +43,7 @@ func (c *Client) GetBucketRequestPayment(ctx context.Context, params *GetBucketR addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_GetBucketTagging.go b/service/s3/api_op_GetBucketTagging.go index 478717ffac2..f368ac694bc 100644 --- a/service/s3/api_op_GetBucketTagging.go +++ b/service/s3/api_op_GetBucketTagging.go @@ -45,6 +45,7 @@ func (c *Client) GetBucketTagging(ctx context.Context, params *GetBucketTaggingI addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_GetBucketVersioning.go b/service/s3/api_op_GetBucketVersioning.go index 9b16e4cc444..1e88f972a65 100644 --- a/service/s3/api_op_GetBucketVersioning.go +++ b/service/s3/api_op_GetBucketVersioning.go @@ -44,6 +44,7 @@ func (c *Client) GetBucketVersioning(ctx context.Context, params *GetBucketVersi addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_GetBucketWebsite.go b/service/s3/api_op_GetBucketWebsite.go index 7e94751e106..b17d87e1575 100644 --- a/service/s3/api_op_GetBucketWebsite.go +++ b/service/s3/api_op_GetBucketWebsite.go @@ -50,6 +50,7 @@ func (c *Client) GetBucketWebsite(ctx context.Context, params *GetBucketWebsiteI addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_GetObject.go b/service/s3/api_op_GetObject.go index eba990d0fd3..e2bfa1e089f 100644 --- a/service/s3/api_op_GetObject.go +++ b/service/s3/api_op_GetObject.go @@ -135,6 +135,7 @@ func (c *Client) GetObject(ctx context.Context, params *GetObjectInput, optFns . addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_GetObjectAcl.go b/service/s3/api_op_GetObjectAcl.go index 6f3f44d26db..568dd179ce7 100644 --- a/service/s3/api_op_GetObjectAcl.go +++ b/service/s3/api_op_GetObjectAcl.go @@ -43,6 +43,7 @@ func (c *Client) GetObjectAcl(ctx context.Context, params *GetObjectAclInput, op addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_GetObjectLegalHold.go b/service/s3/api_op_GetObjectLegalHold.go index ed1f0338d59..217ea141bcf 100644 --- a/service/s3/api_op_GetObjectLegalHold.go +++ b/service/s3/api_op_GetObjectLegalHold.go @@ -38,6 +38,7 @@ func (c *Client) GetObjectLegalHold(ctx context.Context, params *GetObjectLegalH addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_GetObjectLockConfiguration.go b/service/s3/api_op_GetObjectLockConfiguration.go index e5ce09069ed..5af8d9a1c9c 100644 --- a/service/s3/api_op_GetObjectLockConfiguration.go +++ b/service/s3/api_op_GetObjectLockConfiguration.go @@ -40,6 +40,7 @@ func (c *Client) GetObjectLockConfiguration(ctx context.Context, params *GetObje addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_GetObjectRetention.go b/service/s3/api_op_GetObjectRetention.go index 5049d0a5a52..bb766fb3507 100644 --- a/service/s3/api_op_GetObjectRetention.go +++ b/service/s3/api_op_GetObjectRetention.go @@ -38,6 +38,7 @@ func (c *Client) GetObjectRetention(ctx context.Context, params *GetObjectRetent addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_GetObjectTagging.go b/service/s3/api_op_GetObjectTagging.go index 0e1a85a505c..2f91b099971 100644 --- a/service/s3/api_op_GetObjectTagging.go +++ b/service/s3/api_op_GetObjectTagging.go @@ -50,6 +50,7 @@ func (c *Client) GetObjectTagging(ctx context.Context, params *GetObjectTaggingI addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_GetObjectTorrent.go b/service/s3/api_op_GetObjectTorrent.go index 4abc97ec733..0f65a9a225a 100644 --- a/service/s3/api_op_GetObjectTorrent.go +++ b/service/s3/api_op_GetObjectTorrent.go @@ -45,6 +45,7 @@ func (c *Client) GetObjectTorrent(ctx context.Context, params *GetObjectTorrentI addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_GetPublicAccessBlock.go b/service/s3/api_op_GetPublicAccessBlock.go index dc8fee99f28..45bb489951c 100644 --- a/service/s3/api_op_GetPublicAccessBlock.go +++ b/service/s3/api_op_GetPublicAccessBlock.go @@ -56,6 +56,7 @@ func (c *Client) GetPublicAccessBlock(ctx context.Context, params *GetPublicAcce addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_HeadBucket.go b/service/s3/api_op_HeadBucket.go index 862813c2518..4447d2cda15 100644 --- a/service/s3/api_op_HeadBucket.go +++ b/service/s3/api_op_HeadBucket.go @@ -46,6 +46,7 @@ func (c *Client) HeadBucket(ctx context.Context, params *HeadBucketInput, optFns addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_HeadObject.go b/service/s3/api_op_HeadObject.go index be40975400d..f55d4efa4dd 100644 --- a/service/s3/api_op_HeadObject.go +++ b/service/s3/api_op_HeadObject.go @@ -85,6 +85,7 @@ func (c *Client) HeadObject(ctx context.Context, params *HeadObjectInput, optFns addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_ListBucketAnalyticsConfigurations.go b/service/s3/api_op_ListBucketAnalyticsConfigurations.go index bcb6914abf3..d47ce400791 100644 --- a/service/s3/api_op_ListBucketAnalyticsConfigurations.go +++ b/service/s3/api_op_ListBucketAnalyticsConfigurations.go @@ -60,6 +60,7 @@ func (c *Client) ListBucketAnalyticsConfigurations(ctx context.Context, params * addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_ListBucketInventoryConfigurations.go b/service/s3/api_op_ListBucketInventoryConfigurations.go index 81b14bfc13f..51d57dda1a5 100644 --- a/service/s3/api_op_ListBucketInventoryConfigurations.go +++ b/service/s3/api_op_ListBucketInventoryConfigurations.go @@ -60,6 +60,7 @@ func (c *Client) ListBucketInventoryConfigurations(ctx context.Context, params * addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_ListBucketMetricsConfigurations.go b/service/s3/api_op_ListBucketMetricsConfigurations.go index 1c430a3b8a1..953430fc166 100644 --- a/service/s3/api_op_ListBucketMetricsConfigurations.go +++ b/service/s3/api_op_ListBucketMetricsConfigurations.go @@ -62,6 +62,7 @@ func (c *Client) ListBucketMetricsConfigurations(ctx context.Context, params *Li addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_ListBuckets.go b/service/s3/api_op_ListBuckets.go index df9ec95175c..46b76222f83 100644 --- a/service/s3/api_op_ListBuckets.go +++ b/service/s3/api_op_ListBuckets.go @@ -36,6 +36,7 @@ func (c *Client) ListBuckets(ctx context.Context, params *ListBucketsInput, optF addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_ListMultipartUploads.go b/service/s3/api_op_ListMultipartUploads.go index 0c77e111203..587f8c4ffa0 100644 --- a/service/s3/api_op_ListMultipartUploads.go +++ b/service/s3/api_op_ListMultipartUploads.go @@ -61,6 +61,7 @@ func (c *Client) ListMultipartUploads(ctx context.Context, params *ListMultipart addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_ListObjectVersions.go b/service/s3/api_op_ListObjectVersions.go index e5147fb4d27..81504eaa0ad 100644 --- a/service/s3/api_op_ListObjectVersions.go +++ b/service/s3/api_op_ListObjectVersions.go @@ -45,6 +45,7 @@ func (c *Client) ListObjectVersions(ctx context.Context, params *ListObjectVersi addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_ListObjects.go b/service/s3/api_op_ListObjects.go index 7bf774cbe5c..4cb8e370dca 100644 --- a/service/s3/api_op_ListObjects.go +++ b/service/s3/api_op_ListObjects.go @@ -47,6 +47,7 @@ func (c *Client) ListObjects(ctx context.Context, params *ListObjectsInput, optF addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_ListObjectsV2.go b/service/s3/api_op_ListObjectsV2.go index a228ac3a0e2..f5224d20afb 100644 --- a/service/s3/api_op_ListObjectsV2.go +++ b/service/s3/api_op_ListObjectsV2.go @@ -57,6 +57,7 @@ func (c *Client) ListObjectsV2(ctx context.Context, params *ListObjectsV2Input, addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_ListParts.go b/service/s3/api_op_ListParts.go index b393e0b7ea2..c55aad0f3c5 100644 --- a/service/s3/api_op_ListParts.go +++ b/service/s3/api_op_ListParts.go @@ -57,6 +57,7 @@ func (c *Client) ListParts(ctx context.Context, params *ListPartsInput, optFns . addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_PutBucketAccelerateConfiguration.go b/service/s3/api_op_PutBucketAccelerateConfiguration.go index 5fe8351213c..7e96e68f7eb 100644 --- a/service/s3/api_op_PutBucketAccelerateConfiguration.go +++ b/service/s3/api_op_PutBucketAccelerateConfiguration.go @@ -61,6 +61,7 @@ func (c *Client) PutBucketAccelerateConfiguration(ctx context.Context, params *P addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_PutBucketAcl.go b/service/s3/api_op_PutBucketAcl.go index 649ca10c587..f9e313a0b1a 100644 --- a/service/s3/api_op_PutBucketAcl.go +++ b/service/s3/api_op_PutBucketAcl.go @@ -110,6 +110,7 @@ func (c *Client) PutBucketAcl(ctx context.Context, params *PutBucketAclInput, op addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_PutBucketAnalyticsConfiguration.go b/service/s3/api_op_PutBucketAnalyticsConfiguration.go index cb52eb9f281..9956c62bae7 100644 --- a/service/s3/api_op_PutBucketAnalyticsConfiguration.go +++ b/service/s3/api_op_PutBucketAnalyticsConfiguration.go @@ -74,6 +74,7 @@ func (c *Client) PutBucketAnalyticsConfiguration(ctx context.Context, params *Pu addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_PutBucketCors.go b/service/s3/api_op_PutBucketCors.go index 4334df170bb..e29929e8637 100644 --- a/service/s3/api_op_PutBucketCors.go +++ b/service/s3/api_op_PutBucketCors.go @@ -71,6 +71,7 @@ func (c *Client) PutBucketCors(ctx context.Context, params *PutBucketCorsInput, addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_PutBucketEncryption.go b/service/s3/api_op_PutBucketEncryption.go index 2e74665938d..8e4e209b934 100644 --- a/service/s3/api_op_PutBucketEncryption.go +++ b/service/s3/api_op_PutBucketEncryption.go @@ -55,6 +55,7 @@ func (c *Client) PutBucketEncryption(ctx context.Context, params *PutBucketEncry addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_PutBucketInventoryConfiguration.go b/service/s3/api_op_PutBucketInventoryConfiguration.go index 7a875b6dbf9..05d904c0b59 100644 --- a/service/s3/api_op_PutBucketInventoryConfiguration.go +++ b/service/s3/api_op_PutBucketInventoryConfiguration.go @@ -77,6 +77,7 @@ func (c *Client) PutBucketInventoryConfiguration(ctx context.Context, params *Pu addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_PutBucketLifecycleConfiguration.go b/service/s3/api_op_PutBucketLifecycleConfiguration.go index 00f39303333..df38cdc61aa 100644 --- a/service/s3/api_op_PutBucketLifecycleConfiguration.go +++ b/service/s3/api_op_PutBucketLifecycleConfiguration.go @@ -81,6 +81,7 @@ func (c *Client) PutBucketLifecycleConfiguration(ctx context.Context, params *Pu addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_PutBucketLogging.go b/service/s3/api_op_PutBucketLogging.go index 117be083df0..5e170d081ce 100644 --- a/service/s3/api_op_PutBucketLogging.go +++ b/service/s3/api_op_PutBucketLogging.go @@ -68,6 +68,7 @@ func (c *Client) PutBucketLogging(ctx context.Context, params *PutBucketLoggingI addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_PutBucketMetricsConfiguration.go b/service/s3/api_op_PutBucketMetricsConfiguration.go index ec9c71e14c6..6d736643578 100644 --- a/service/s3/api_op_PutBucketMetricsConfiguration.go +++ b/service/s3/api_op_PutBucketMetricsConfiguration.go @@ -60,6 +60,7 @@ func (c *Client) PutBucketMetricsConfiguration(ctx context.Context, params *PutB addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_PutBucketNotificationConfiguration.go b/service/s3/api_op_PutBucketNotificationConfiguration.go index 86d87f54b44..302d5fe91eb 100644 --- a/service/s3/api_op_PutBucketNotificationConfiguration.go +++ b/service/s3/api_op_PutBucketNotificationConfiguration.go @@ -73,6 +73,7 @@ func (c *Client) PutBucketNotificationConfiguration(ctx context.Context, params addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_PutBucketPolicy.go b/service/s3/api_op_PutBucketPolicy.go index 1beec757f58..6245cdf44e1 100644 --- a/service/s3/api_op_PutBucketPolicy.go +++ b/service/s3/api_op_PutBucketPolicy.go @@ -51,6 +51,7 @@ func (c *Client) PutBucketPolicy(ctx context.Context, params *PutBucketPolicyInp addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_PutBucketReplication.go b/service/s3/api_op_PutBucketReplication.go index 9efc0438f88..1dfc2dd03bb 100644 --- a/service/s3/api_op_PutBucketReplication.go +++ b/service/s3/api_op_PutBucketReplication.go @@ -79,6 +79,7 @@ func (c *Client) PutBucketReplication(ctx context.Context, params *PutBucketRepl addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_PutBucketRequestPayment.go b/service/s3/api_op_PutBucketRequestPayment.go index a750bdd93c1..4bc4cfca150 100644 --- a/service/s3/api_op_PutBucketRequestPayment.go +++ b/service/s3/api_op_PutBucketRequestPayment.go @@ -44,6 +44,7 @@ func (c *Client) PutBucketRequestPayment(ctx context.Context, params *PutBucketR addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_PutBucketTagging.go b/service/s3/api_op_PutBucketTagging.go index 77575cdc1e2..a6f42e48959 100644 --- a/service/s3/api_op_PutBucketTagging.go +++ b/service/s3/api_op_PutBucketTagging.go @@ -73,6 +73,7 @@ func (c *Client) PutBucketTagging(ctx context.Context, params *PutBucketTaggingI addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_PutBucketVersioning.go b/service/s3/api_op_PutBucketVersioning.go index 8993eefbdbe..f277c56a960 100644 --- a/service/s3/api_op_PutBucketVersioning.go +++ b/service/s3/api_op_PutBucketVersioning.go @@ -59,6 +59,7 @@ func (c *Client) PutBucketVersioning(ctx context.Context, params *PutBucketVersi addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_PutBucketWebsite.go b/service/s3/api_op_PutBucketWebsite.go index 0ac4a617c3f..d08f7d50616 100644 --- a/service/s3/api_op_PutBucketWebsite.go +++ b/service/s3/api_op_PutBucketWebsite.go @@ -73,6 +73,7 @@ func (c *Client) PutBucketWebsite(ctx context.Context, params *PutBucketWebsiteI addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_PutObject.go b/service/s3/api_op_PutObject.go index d44985a53fb..15f31c06453 100644 --- a/service/s3/api_op_PutObject.go +++ b/service/s3/api_op_PutObject.go @@ -88,6 +88,7 @@ func (c *Client) PutObject(ctx context.Context, params *PutObjectInput, optFns . addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_PutObjectAcl.go b/service/s3/api_op_PutObjectAcl.go index c2130af28e9..651f9326576 100644 --- a/service/s3/api_op_PutObjectAcl.go +++ b/service/s3/api_op_PutObjectAcl.go @@ -108,6 +108,7 @@ func (c *Client) PutObjectAcl(ctx context.Context, params *PutObjectAclInput, op addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_PutObjectLegalHold.go b/service/s3/api_op_PutObjectLegalHold.go index ee0414d2d56..711dd3fa087 100644 --- a/service/s3/api_op_PutObjectLegalHold.go +++ b/service/s3/api_op_PutObjectLegalHold.go @@ -41,6 +41,7 @@ func (c *Client) PutObjectLegalHold(ctx context.Context, params *PutObjectLegalH addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_PutObjectLockConfiguration.go b/service/s3/api_op_PutObjectLockConfiguration.go index ec32139ba52..0d583782f94 100644 --- a/service/s3/api_op_PutObjectLockConfiguration.go +++ b/service/s3/api_op_PutObjectLockConfiguration.go @@ -43,6 +43,7 @@ func (c *Client) PutObjectLockConfiguration(ctx context.Context, params *PutObje addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_PutObjectRetention.go b/service/s3/api_op_PutObjectRetention.go index 1b82faaa4ef..42727b80592 100644 --- a/service/s3/api_op_PutObjectRetention.go +++ b/service/s3/api_op_PutObjectRetention.go @@ -41,6 +41,7 @@ func (c *Client) PutObjectRetention(ctx context.Context, params *PutObjectRetent addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_PutObjectTagging.go b/service/s3/api_op_PutObjectTagging.go index df093e19c3f..6c7ea1a27c8 100644 --- a/service/s3/api_op_PutObjectTagging.go +++ b/service/s3/api_op_PutObjectTagging.go @@ -66,6 +66,7 @@ func (c *Client) PutObjectTagging(ctx context.Context, params *PutObjectTaggingI addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_PutPublicAccessBlock.go b/service/s3/api_op_PutPublicAccessBlock.go index 01ce0374f5c..a8d89ebc8b6 100644 --- a/service/s3/api_op_PutPublicAccessBlock.go +++ b/service/s3/api_op_PutPublicAccessBlock.go @@ -56,6 +56,7 @@ func (c *Client) PutPublicAccessBlock(ctx context.Context, params *PutPublicAcce addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_RestoreObject.go b/service/s3/api_op_RestoreObject.go index 093f4b4980f..20f868470c3 100644 --- a/service/s3/api_op_RestoreObject.go +++ b/service/s3/api_op_RestoreObject.go @@ -245,6 +245,7 @@ func (c *Client) RestoreObject(ctx context.Context, params *RestoreObjectInput, addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_UploadPart.go b/service/s3/api_op_UploadPart.go index b42f41d895b..b5f8b46ef34 100644 --- a/service/s3/api_op_UploadPart.go +++ b/service/s3/api_op_UploadPart.go @@ -95,6 +95,7 @@ func (c *Client) UploadPart(ctx context.Context, params *UploadPartInput, optFns addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/api_op_UploadPartCopy.go b/service/s3/api_op_UploadPartCopy.go index 0a64d3a4b74..2df015e4085 100644 --- a/service/s3/api_op_UploadPartCopy.go +++ b/service/s3/api_op_UploadPartCopy.go @@ -107,6 +107,7 @@ func (c *Client) UploadPartCopy(ctx context.Context, params *UploadPartCopyInput addResponseErrorMiddleware(stack) addMetadataRetrieverMiddleware(stack) v4.AddContentSHA256HeaderMiddleware(stack) + disableAcceptEncodingGzip(stack) for _, fn := range options.APIOptions { if err := fn(stack); err != nil { diff --git a/service/s3/go.mod b/service/s3/go.mod index 2b6dbab5098..5f6d8b2b050 100644 --- a/service/s3/go.mod +++ b/service/s3/go.mod @@ -4,6 +4,7 @@ go 1.15 require ( github.com/aws/aws-sdk-go-v2 v0.25.0 + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v0.0.0-20200930084954-897dfb99530c github.com/aws/aws-sdk-go-v2/service/internal/s3shared v0.1.0 github.com/awslabs/smithy-go v0.1.0 ) @@ -11,3 +12,4 @@ require ( replace github.com/aws/aws-sdk-go-v2 => ../../ replace github.com/aws/aws-sdk-go-v2/service/internal/s3shared => ../../service/internal/s3shared/ +replace github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding => ../../service/internal/accept-encoding/