Skip to content

Commit 11aebce

Browse files
authored
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.
1 parent 55890a0 commit 11aebce

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

service/s3/internal/customizations/update_endpoint.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ type UpdateEndpointParameterAccessor struct {
3535

3636
// UpdateEndpointOptions provides the options for the UpdateEndpoint middleware setup.
3737
type UpdateEndpointOptions struct {
38-
3938
// Accessor are parameter accessors used by the middleware
4039
Accessor UpdateEndpointParameterAccessor
4140

@@ -256,8 +255,11 @@ func removeBucketFromPath(u *url.URL, bucket string) {
256255
}
257256

258257
// hostCompatibleBucketName returns true if the request should
259-
// put the bucket in the host. This is false if S3ForcePathStyle is
260-
// explicitly set or if the bucket is not DNS compatible.
258+
// put the bucket in the host. This is false if the bucket is not
259+
// DNS compatible or the EndpointResolver resolves an aws.Endpoint with
260+
// HostnameImmutable member set to true.
261+
//
262+
// https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws#Endpoint.HostnameImmutable
261263
func hostCompatibleBucketName(u *url.URL, bucket string) bool {
262264
// Bucket might be DNS compatible but dots in the hostname will fail
263265
// certificate validation, so do not use host-style.

0 commit comments

Comments
 (0)