From 1b7b8f14c9be906a9da43db3072e8507a971adf8 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Thu, 1 Mar 2018 14:16:40 -0800 Subject: [PATCH] Set appropriate encryption headers in HEAD object response (#5596) Currently we don't set two SSE-C specific headers fix it for AWS S3 compatibility. --- cmd/object-handlers.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/object-handlers.go b/cmd/object-handlers.go index c8b89b32c..befe15607 100644 --- a/cmd/object-handlers.go +++ b/cmd/object-handlers.go @@ -256,6 +256,8 @@ func (api objectAPIHandlers) HeadObjectHandler(w http.ResponseWriter, r *http.Re writeErrorResponse(w, ErrSSEEncryptedObject, r.URL) return } + w.Header().Set(SSECustomerAlgorithm, r.Header.Get(SSECustomerAlgorithm)) + w.Header().Set(SSECustomerKeyMD5, r.Header.Get(SSECustomerKeyMD5)) } }