File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,11 @@ func (opts *PutObjectOptions) SetMatchETag(etag string) {
106
106
if opts .customHeaders == nil {
107
107
opts .customHeaders = http.Header {}
108
108
}
109
- opts .customHeaders .Set ("If-Match" , "\" " + etag + "\" " )
109
+ if etag == "*" {
110
+ opts .customHeaders .Set ("If-Match" , "*" )
111
+ } else {
112
+ opts .customHeaders .Set ("If-Match" , "\" " + etag + "\" " )
113
+ }
110
114
}
111
115
112
116
// SetMatchETagExcept if etag does not match while PUT MinIO returns an
@@ -116,7 +120,11 @@ func (opts *PutObjectOptions) SetMatchETagExcept(etag string) {
116
120
if opts .customHeaders == nil {
117
121
opts .customHeaders = http.Header {}
118
122
}
119
- opts .customHeaders .Set ("If-None-Match" , "\" " + etag + "\" " )
123
+ if etag == "*" {
124
+ opts .customHeaders .Set ("If-None-Match" , "*" )
125
+ } else {
126
+ opts .customHeaders .Set ("If-None-Match" , "\" " + etag + "\" " )
127
+ }
120
128
}
121
129
122
130
// getNumThreads - gets the number of threads to be used in the multipart
You can’t perform that action at this time.
0 commit comments