mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 18:12:25 -05:00
[chore]: Bump github.com/minio/minio-go/v7 from 7.0.71 to 7.0.72 (#3037)
This commit is contained in:
parent
ddef307622
commit
b9864e83a0
7 changed files with 21 additions and 23 deletions
2
vendor/github.com/minio/minio-go/v7/api-compose-object.go
generated
vendored
2
vendor/github.com/minio/minio-go/v7/api-compose-object.go
generated
vendored
|
|
@ -119,7 +119,7 @@ func (opts CopyDestOptions) Marshal(header http.Header) {
|
|||
if opts.ReplaceMetadata {
|
||||
header.Set("x-amz-metadata-directive", replaceDirective)
|
||||
for k, v := range filterCustomMeta(opts.UserMetadata) {
|
||||
if isAmzHeader(k) || isStandardHeader(k) || isStorageClassHeader(k) || isValidReplicationEncryptionHeader(k) {
|
||||
if isAmzHeader(k) || isStandardHeader(k) || isStorageClassHeader(k) || isMinioHeader(k) {
|
||||
header.Set(k, v)
|
||||
} else {
|
||||
header.Set("x-amz-meta-"+k, v)
|
||||
|
|
|
|||
16
vendor/github.com/minio/minio-go/v7/api-put-object.go
generated
vendored
16
vendor/github.com/minio/minio-go/v7/api-put-object.go
generated
vendored
|
|
@ -106,7 +106,11 @@ func (opts *PutObjectOptions) SetMatchETag(etag string) {
|
|||
if opts.customHeaders == nil {
|
||||
opts.customHeaders = http.Header{}
|
||||
}
|
||||
opts.customHeaders.Set("If-Match", "\""+etag+"\"")
|
||||
if etag == "*" {
|
||||
opts.customHeaders.Set("If-Match", "*")
|
||||
} else {
|
||||
opts.customHeaders.Set("If-Match", "\""+etag+"\"")
|
||||
}
|
||||
}
|
||||
|
||||
// SetMatchETagExcept if etag does not match while PUT MinIO returns an
|
||||
|
|
@ -116,7 +120,11 @@ func (opts *PutObjectOptions) SetMatchETagExcept(etag string) {
|
|||
if opts.customHeaders == nil {
|
||||
opts.customHeaders = http.Header{}
|
||||
}
|
||||
opts.customHeaders.Set("If-None-Match", "\""+etag+"\"")
|
||||
if etag == "*" {
|
||||
opts.customHeaders.Set("If-None-Match", "*")
|
||||
} else {
|
||||
opts.customHeaders.Set("If-None-Match", "\""+etag+"\"")
|
||||
}
|
||||
}
|
||||
|
||||
// getNumThreads - gets the number of threads to be used in the multipart
|
||||
|
|
@ -212,7 +220,7 @@ func (opts PutObjectOptions) Header() (header http.Header) {
|
|||
}
|
||||
|
||||
for k, v := range opts.UserMetadata {
|
||||
if isAmzHeader(k) || isStandardHeader(k) || isStorageClassHeader(k) || isValidReplicationEncryptionHeader(k) {
|
||||
if isAmzHeader(k) || isStandardHeader(k) || isStorageClassHeader(k) || isMinioHeader(k) {
|
||||
header.Set(k, v)
|
||||
} else {
|
||||
header.Set("x-amz-meta-"+k, v)
|
||||
|
|
@ -230,7 +238,7 @@ func (opts PutObjectOptions) Header() (header http.Header) {
|
|||
// validate() checks if the UserMetadata map has standard headers or and raises an error if so.
|
||||
func (opts PutObjectOptions) validate() (err error) {
|
||||
for k, v := range opts.UserMetadata {
|
||||
if !httpguts.ValidHeaderFieldName(k) || isStandardHeader(k) || isSSEHeader(k) || isStorageClassHeader(k) || isValidReplicationEncryptionHeader(k) {
|
||||
if !httpguts.ValidHeaderFieldName(k) || isStandardHeader(k) || isSSEHeader(k) || isStorageClassHeader(k) || isMinioHeader(k) {
|
||||
return errInvalidArgument(k + " unsupported user defined metadata name")
|
||||
}
|
||||
if !httpguts.ValidHeaderFieldValue(v) {
|
||||
|
|
|
|||
2
vendor/github.com/minio/minio-go/v7/api.go
generated
vendored
2
vendor/github.com/minio/minio-go/v7/api.go
generated
vendored
|
|
@ -129,7 +129,7 @@ type Options struct {
|
|||
// Global constants.
|
||||
const (
|
||||
libraryName = "minio-go"
|
||||
libraryVersion = "v7.0.71"
|
||||
libraryVersion = "v7.0.72"
|
||||
)
|
||||
|
||||
// User Agent should always following the below style.
|
||||
|
|
|
|||
16
vendor/github.com/minio/minio-go/v7/utils.go
generated
vendored
16
vendor/github.com/minio/minio-go/v7/utils.go
generated
vendored
|
|
@ -510,19 +510,9 @@ func isAmzHeader(headerKey string) bool {
|
|||
return strings.HasPrefix(key, "x-amz-meta-") || strings.HasPrefix(key, "x-amz-grant-") || key == "x-amz-acl" || isSSEHeader(headerKey) || strings.HasPrefix(key, "x-amz-checksum-")
|
||||
}
|
||||
|
||||
var supportedReplicationEncryptionHeaders = map[string]bool{
|
||||
"x-minio-replication-server-side-encryption-sealed-key": true,
|
||||
"x-minio-replication-server-side-encryption-seal-algorithm": true,
|
||||
"x-minio-replication-server-side-encryption-iv": true,
|
||||
"x-minio-replication-encrypted-multipart": true,
|
||||
"x-minio-replication-actual-object-size": true,
|
||||
// Add more supported headers here.
|
||||
// Must be lower case.
|
||||
}
|
||||
|
||||
// isValidReplicationEncryptionHeader returns true if header is one of valid replication encryption headers
|
||||
func isValidReplicationEncryptionHeader(headerKey string) bool {
|
||||
return supportedReplicationEncryptionHeaders[strings.ToLower(headerKey)]
|
||||
// isMinioHeader returns true if header is x-minio- header.
|
||||
func isMinioHeader(headerKey string) bool {
|
||||
return strings.HasPrefix(strings.ToLower(headerKey), "x-minio-")
|
||||
}
|
||||
|
||||
// supportedQueryValues is a list of query strings that can be passed in when using GetObject.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue