From 0827a2747b3738f6364f70fbe54a58a13a47469c Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Tue, 14 Nov 2017 16:57:19 -0800 Subject: [PATCH] api: CopyObject should return NotImplemented for now (#5183) Commit ca6b4773ed438e46720e34b27bb90600416014f4 introduces SSE-C support for HEAD, GET, PUT operations but since we do not implement CopyObject() we should return NotImplemented. --- cmd/object-handlers.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/object-handlers.go b/cmd/object-handlers.go index b1d1964f3..990718f35 100644 --- a/cmd/object-handlers.go +++ b/cmd/object-handlers.go @@ -358,6 +358,12 @@ func (api objectAPIHandlers) CopyObjectHandler(w http.ResponseWriter, r *http.Re return } + if IsSSECustomerRequest(r.Header) { // handle SSE-C requests + // SSE-C is not implemented for CopyObject operations yet + writeErrorResponse(w, ErrNotImplemented, r.URL) + return + } + cpSrcDstSame := srcBucket == dstBucket && srcObject == dstObject // Hold write lock on destination since in both cases // - if source and destination are same