mirror of
https://github.com/pgsty/minio.git
synced 2026-07-27 07:56:17 +03:00
Remove duplicate code in object-handlers.go (#7176)
removed duplicate code in CompleteMultipartUploadHandler and CopyObjectPartHandler.
This commit is contained in:
committed by
Harshavardhana
parent
f04f8bbc78
commit
9a65f6dc97
@@ -1673,7 +1673,6 @@ func (api objectAPIHandlers) CopyObjectPartHandler(w http.ResponseWriter, r *htt
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if crypto.IsEncrypted(li.UserDefined) {
|
if crypto.IsEncrypted(li.UserDefined) {
|
||||||
isEncrypted = true
|
|
||||||
if !crypto.SSEC.IsRequested(r.Header) && crypto.SSEC.IsEncrypted(li.UserDefined) {
|
if !crypto.SSEC.IsRequested(r.Header) && crypto.SSEC.IsEncrypted(li.UserDefined) {
|
||||||
writeErrorResponse(w, ErrSSEMultipartEncrypted, r.URL, guessIsBrowserReq(r))
|
writeErrorResponse(w, ErrSSEMultipartEncrypted, r.URL, guessIsBrowserReq(r))
|
||||||
return
|
return
|
||||||
@@ -1682,7 +1681,7 @@ func (api objectAPIHandlers) CopyObjectPartHandler(w http.ResponseWriter, r *htt
|
|||||||
writeErrorResponse(w, ErrSSEMultipartEncrypted, r.URL, guessIsBrowserReq(r))
|
writeErrorResponse(w, ErrSSEMultipartEncrypted, r.URL, guessIsBrowserReq(r))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
isEncrypted = true // to detect SSE-S3 encryption
|
isEncrypted = true
|
||||||
var key []byte
|
var key []byte
|
||||||
if crypto.SSEC.IsRequested(r.Header) {
|
if crypto.SSEC.IsRequested(r.Header) {
|
||||||
key, err = ParseSSECustomerRequest(r)
|
key, err = ParseSSECustomerRequest(r)
|
||||||
@@ -2194,8 +2193,6 @@ func (api objectAPIHandlers) CompleteMultipartUploadHandler(w http.ResponseWrite
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if crypto.IsEncrypted(li.UserDefined) {
|
if crypto.IsEncrypted(li.UserDefined) {
|
||||||
isEncrypted = true
|
|
||||||
ssec = crypto.SSEC.IsEncrypted(li.UserDefined)
|
|
||||||
var key []byte
|
var key []byte
|
||||||
isEncrypted = true
|
isEncrypted = true
|
||||||
ssec = crypto.SSEC.IsEncrypted(li.UserDefined)
|
ssec = crypto.SSEC.IsEncrypted(li.UserDefined)
|
||||||
|
|||||||
Reference in New Issue
Block a user