-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
service/s3: Metadata returns uppercase character #445
Comments
Using these versions:
|
Thanks for reporting this issue @mattes. It looks like this issue is attributed to the REST header map unmarshaller. We can test it, but I think this method can be updated to extract the original header casing/format instead of always returning the canonical header key form. Will need to also verify that setting the metadata headers via the SDK don't mutate the casing also. You could workaround this issue in the interim by manually extracting the metadata headers from the |
@mattes The SDK will automatically case the metadata fields to Go net/http's standard header canonical formating. The issue we're seeing here is the service's implementation details of the metadata fields being transmitted via headers bleeding into how the SDK returns them. This issue could be addressed and maintain backwards compatibility by introducing an option to ensure the metadata parameters maintain their original casing. Instead of using Go's canonical header key format. |
To add a datapoint to this issue; I tripped over the same thing while retrieving metadata i'd set as lowercase keys and finding that i needed to fetch them using canonical header keys. I think even adding an accessor method to |
Please note that this issue still persists more than two years after it was originally opened. I would consider this a bug rather than a Feature Request - different casing is unexpected behavior and requires additional code as a workaround. |
the problem still not solved, using version: v1.16.26 😕 |
still an issue with v1.20.2 :( |
This is definitely a bug, not a feature-request. Still there in 1.29.21. What makes it even more confusing is that if you set the metadata for example via PutObjectInput the keys will always be set as all lowercase. |
Tripped up on this myself today. Worth noting that the official docs explicitly state "Amazon S3 stores user-defined metadata keys in lowercase". |
Adding obligatory #MeToo . It is definitely not expected behaviour... |
Hi, guys. Actually, you can use
But there was a bug in this feature, and the PR #3671 fixed this. Amazon metadata for S3 is case insensitive on the keys, but the Golang SDK is weird. The unmarshalHeaderMap method always returns the canonical header key form. So enable Cheers. |
We have noticed this issue has not received attention in 1 year. We will close this issue for now. If you think this is in error, please feel free to comment and reopen the issue. |
Ping. |
With #3033 and #3671 Config.LowerCaseHeaderMaps feature released in the SDK, I think we can close this issue. With this option you can opt-in to lower casing all S3 metadata header key values for consistent usage round tripping request and responses between operation calls. The v2 SDK, aws-sdk-go-v2, uses lower case header maps by default. @graywolf-at-work are there additional issues that you're running into that this option does not address? |
Especially with v2 using the lower case by default, I think there might not be anything left to do. But this was not stated here anywhere (or I was not able to understand it), except for now in your comment. With that comment in place I think this can be closed. |
Thanks for the feedback. I created Pr #4297 documenting this difference. |
Adds small blurb to `Config.LowerCaseHeaderMaps` documenting the v1's opt-in behavior vs v2's default behavior. Related to #445
|
In the console:
When I do:
I get:
Please note
Lp2
. I would assume it returnslp2
. Is this expected?The text was updated successfully, but these errors were encountered: