package acceptencoding
Import Path
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding (on go.dev)
Dependency Relation
imports 7 packages, and imported by one package
Involved Source Files
accept_encoding_gzip.go
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.
go_module_metadata.go
Package-Level Type Names (total 5, in which 4 are exported)
AddAcceptEncodingGzipOptions provides the options for the
AddAcceptEncodingGzip middleware setup.
Enable bool
func AddAcceptEncodingGzip(stack *middleware.Stack, options AddAcceptEncodingGzipOptions) error
DecompressGzip provides the middleware for decompressing a gzip
response from the service.
HandleDeserialize implements the DeserializeMiddlware interface.
ID returns the id for the middleware.
*DecompressGzip : github.com/aws/smithy-go/middleware.DeserializeMiddleware
*DecompressGzip : github.com/aws/smithy-go/middleware.ider
DisableGzip provides the middleware that will
disable the underlying http client automatically enabling for gzip
decompress content-encoding support.
HandleFinalize implements the FinalizeMiddleware interface.
ID returns the id for the middleware.
*DisableGzip : github.com/aws/smithy-go/middleware.FinalizeMiddleware
*DisableGzip : github.com/aws/smithy-go/middleware.ider
EnableGzip provides a middleware to enable support for
gzip responses, with manual decompression. This prevents the underlying HTTP
client from performing the gzip decompression automatically.
HandleFinalize implements the FinalizeMiddleware interface.
ID returns the id for the middleware.
*EnableGzip : github.com/aws/smithy-go/middleware.FinalizeMiddleware
*EnableGzip : github.com/aws/smithy-go/middleware.ider
Package-Level Functions (total 2, in which 1 are exported)
AddAcceptEncodingGzip explicitly adds handling for accept-encoding GZIP
middleware to the operation stack. This allows checksums to be correctly
computed without disabling GZIP support.
Package-Level Constants (total 3, none are exported)
The pages are generated with Golds v0.4.9. (GOOS=linux GOARCH=amd64)