Closed as not planned
Description
Acknowledgements
- I have searched (https://github.com/aws/aws-sdk/issues?q=is%3Aissue) for past instances of this issue
- I have verified all of my SDK modules are up-to-date (you can perform a bulk update with
go get -u github.com/aws/aws-sdk-go-v2/...
)
Describe the bug
s3 head object:If the object name starts with"/+ bucket name", the SDK will remove the bucket name from the object name in the path of the URL, causing the request to return 404.
code :
s3@v1.73.2 internal/customizations/update_endpoint.go
func moveBucketNameToHost(u *url.URL, bucket string) { u.Host = bucket + "." + u.Host removeBucketFromPath(u, bucket) }
Regression Issue
- Select this option if this issue appears to be a regression.
Expected Behavior
Object names should not be modified
Current Behavior
If the object name starts with"/+ bucket name", the SDK will remove the bucket name from the object name in the path of the URL
Reproduction Steps
Head An object prefixed with "/+ bucket name"
Possible Solution
No response
Additional Information/Context
No response
AWS Go SDK V2 Module Versions Used
github.com/aws/aws-sdk-go-v2 v1.33.0
github.com/aws/aws-sdk-go-v2/config v1.5.0
github.com/aws/aws-sdk-go-v2/service/s3 v1.73.2
github.com/aws/smithy-go v1.22.1
Compiler and Version used
go version go1.21.7 darwin/amd64
Operating System and version
macOS 14.0 (23A344)
Metadata
Metadata
Assignees
Labels
No labels