-
Notifications
You must be signed in to change notification settings - Fork 659
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
fix: get ETag from resp.Body rather than resp.Header #2019
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
klauspost
approved these changes
Nov 16, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I will send a fix for the linter issues (unrelated to your PR)
Linter fixes in #2020 |
vadmeste
approved these changes
Nov 22, 2024
Thank you all. This is very exciting for a beginner. ♥ |
DennisRasey
pushed a commit
to DennisRasey/forgejo
that referenced
this pull request
Jan 21, 2025
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/minio/minio-go/v7](https://github.com/minio/minio-go) | require | patch | `v7.0.83` -> `v7.0.84` | --- ### Release Notes <details> <summary>minio/minio-go (github.com/minio/minio-go/v7)</summary> ### [`v7.0.84`](https://github.com/minio/minio-go/releases/tag/v7.0.84): Bugfix Release [Compare Source](minio/minio-go@v7.0.83...v7.0.84) #### What's Changed - fix: use Hostname instead of Host in s3utils.GetRegionFromURL by [@​huanghaoyuanhhy](https://github.com/huanghaoyuanhhy) in minio/minio-go#2046 - feat: CopyObject md demo update by [@​767829413](https://github.com/767829413) in minio/minio-go#2017 - fix: get ETag from resp.Body rather than resp.Header by [@​xiangcheng09](https://github.com/xiangcheng09) in minio/minio-go#2019 - move to go1.23 CI by [@​harshavardhana](https://github.com/harshavardhana) in minio/minio-go#2050 - Use default STS endpoints when using empty STS endpoint with IAM by [@​ramondeklein](https://github.com/ramondeklein) in minio/minio-go#2051 #### New Contributors - [@​huanghaoyuanhhy](https://github.com/huanghaoyuanhhy) made their first contribution in minio/minio-go#2046 - [@​767829413](https://github.com/767829413) made their first contribution in minio/minio-go#2017 - [@​xiangcheng09](https://github.com/xiangcheng09) made their first contribution in minio/minio-go#2019 **Full Changelog**: minio/minio-go@v7.0.83...v7.0.84 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "* 0-3 * * *" (UTC), Automerge - "* 0-3 * * *" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMDYuMCIsInVwZGF0ZWRJblZlciI6IjM5LjEwNi4wIiwidGFyZ2V0QnJhbmNoIjoiZm9yZ2VqbyIsImxhYmVscyI6WyJkZXBlbmRlbmN5LXVwZ3JhZGUiLCJ0ZXN0L25vdC1uZWVkZWQiXX0=--> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6629 Reviewed-by: Michael Kriese <[email protected]> Co-authored-by: Renovate Bot <[email protected]> Co-committed-by: Renovate Bot <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When I use the CopyObject function with AWS S3, I find the ETag in the response is always an empty string.
According to AWS's latest API Reference1, the variable ETag is in the CopyObjectResult part, not in the header part.
Therefore, we should modify the source code to get the ETag from cpObjRes rather than resp.Header.Get("ETag").
I did so and got the correct ETag value, which is not an empty string.
I hope you can take this into consideration. If you have any questions, please feel free to ask.
Reference:
Footnotes
https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html ↩