diff --git a/api/handler/acl.go b/api/handler/acl.go index 16b24cb81..2be1a22c0 100644 --- a/api/handler/acl.go +++ b/api/handler/acl.go @@ -170,6 +170,7 @@ func (h *handler) PutBucketACLHandler(w http.ResponseWriter, r *http.Request) { h.logAndSendError(w, "could not update bucket acl", reqInfo, err) return } + w.WriteHeader(http.StatusOK) } func (h *handler) updateBucketACL(r *http.Request, astChild *ast, bkt string) error { @@ -275,6 +276,7 @@ func (h *handler) PutObjectACLHandler(w http.ResponseWriter, r *http.Request) { h.logAndSendError(w, "could not update bucket acl", reqInfo, err) return } + w.WriteHeader(http.StatusOK) } func (h *handler) GetBucketPolicyHandler(w http.ResponseWriter, r *http.Request) { @@ -331,6 +333,7 @@ func (h *handler) PutBucketPolicyHandler(w http.ResponseWriter, r *http.Request) h.logAndSendError(w, "could not update bucket acl", reqInfo, err) return } + w.WriteHeader(http.StatusOK) } func parseACLHeaders(r *http.Request) (*AccessControlPolicy, error) { diff --git a/api/handler/delete.go b/api/handler/delete.go index fca0fe208..eb27ee796 100644 --- a/api/handler/delete.go +++ b/api/handler/delete.go @@ -196,4 +196,5 @@ func (h *handler) DeleteBucketHandler(w http.ResponseWriter, r *http.Request) { if err := h.obj.DeleteBucket(r.Context(), &layer.DeleteBucketParams{Name: reqInfo.BucketName}); err != nil { h.logAndSendError(w, "couldn't delete bucket", reqInfo, err) } + w.WriteHeader(http.StatusNoContent) } diff --git a/api/handler/get.go b/api/handler/get.go index bbd17c980..23dbd5c0a 100644 --- a/api/handler/get.go +++ b/api/handler/get.go @@ -131,6 +131,8 @@ func (h *handler) GetObjectHandler(w http.ResponseWriter, r *http.Request) { writeHeaders(w.Header(), info, len(tagSet)) if params != nil { writeRangeHeaders(w, params, info.Size) + } else { + w.WriteHeader(http.StatusOK) } getParams := &layer.GetObjectParams{ diff --git a/api/handler/tagging.go b/api/handler/tagging.go index 2dc73a9b5..c019327ad 100644 --- a/api/handler/tagging.go +++ b/api/handler/tagging.go @@ -56,6 +56,7 @@ func (h *handler) PutObjectTaggingHandler(w http.ResponseWriter, r *http.Request h.logAndSendError(w, "could not put object tagging", reqInfo, err) return } + w.WriteHeader(http.StatusOK) } func (h *handler) GetObjectTaggingHandler(w http.ResponseWriter, r *http.Request) { @@ -134,6 +135,7 @@ func (h *handler) PutBucketTaggingHandler(w http.ResponseWriter, r *http.Request if err := h.obj.PutBucketTagging(r.Context(), reqInfo.BucketName, tagSet); err != nil { h.logAndSendError(w, "could not put object tagging", reqInfo, err) } + w.WriteHeader(http.StatusOK) } func (h *handler) GetBucketTaggingHandler(w http.ResponseWriter, r *http.Request) { diff --git a/api/handler/versioning.go b/api/handler/versioning.go index dbce63e91..072c3b2d0 100644 --- a/api/handler/versioning.go +++ b/api/handler/versioning.go @@ -37,6 +37,7 @@ func (h *handler) PutBucketVersioningHandler(w http.ResponseWriter, r *http.Requ if _, err := h.obj.PutBucketVersioning(r.Context(), p); err != nil { h.logAndSendError(w, "couldn't put update versioning settings", reqInfo, err) } + w.WriteHeader(http.StatusOK) } // GetBucketVersioningHandler implements bucket versioning getter handler.