From 11aebce1926d64329ea5bb8181fefe135504d3c4 Mon Sep 17 00:00:00 2001 From: Luis Gabriel Gomez Date: Thu, 5 May 2022 17:58:45 -0300 Subject: [PATCH] service/s3: Update hostCompatibleBucketName doc to reflect #848 changes (#1683) Updates the doc string for hostCompatibleBucketName adding link to the resolved Endpoint member driving the behavior. --- service/s3/internal/customizations/update_endpoint.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/service/s3/internal/customizations/update_endpoint.go b/service/s3/internal/customizations/update_endpoint.go index 209e554ef1e..e5f95254aac 100644 --- a/service/s3/internal/customizations/update_endpoint.go +++ b/service/s3/internal/customizations/update_endpoint.go @@ -35,7 +35,6 @@ type UpdateEndpointParameterAccessor struct { // UpdateEndpointOptions provides the options for the UpdateEndpoint middleware setup. type UpdateEndpointOptions struct { - // Accessor are parameter accessors used by the middleware Accessor UpdateEndpointParameterAccessor @@ -256,8 +255,11 @@ func removeBucketFromPath(u *url.URL, bucket string) { } // hostCompatibleBucketName returns true if the request should -// put the bucket in the host. This is false if S3ForcePathStyle is -// explicitly set or if the bucket is not DNS compatible. +// put the bucket in the host. This is false if the bucket is not +// DNS compatible or the EndpointResolver resolves an aws.Endpoint with +// HostnameImmutable member set to true. +// +// https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws#Endpoint.HostnameImmutable func hostCompatibleBucketName(u *url.URL, bucket string) bool { // Bucket might be DNS compatible but dots in the hostname will fail // certificate validation, so do not use host-style.