diff --git a/cmd/api-errors.go b/cmd/api-errors.go index 73da05462..79532f20e 100644 --- a/cmd/api-errors.go +++ b/cmd/api-errors.go @@ -1441,6 +1441,8 @@ func toAPIErrorCode(err error) (apiErr APIErrorCode) { case auth.ErrInvalidSecretKeyLength: apiErr = ErrAdminInvalidSecretKey // SSE errors + case errInvalidEncryptionParameters: + apiErr = ErrInvalidEncryptionParameters case crypto.ErrInvalidEncryptionMethod: apiErr = ErrInvalidEncryptionMethod case errInsecureSSERequest: diff --git a/cmd/object-handlers.go b/cmd/object-handlers.go index 451e6915f..bf7ec7d62 100644 --- a/cmd/object-handlers.go +++ b/cmd/object-handlers.go @@ -570,7 +570,7 @@ func (api objectAPIHandlers) HeadObjectHandler(w http.ResponseWriter, r *http.Re // Set standard object headers. if hErr := setObjectHeaders(w, objInfo, rs); hErr != nil { - writeErrorResponse(w, toAPIErrorCode(hErr), r.URL) + writeErrorResponseHeadersOnly(w, toAPIErrorCode(hErr)) return }