From 1f2dc54647f8ab84f2e8e9cd9aa3632760cee869 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=AA=20Ho=C3=A0ng=20Nam?= Date: Tue, 4 Jun 2024 20:18:47 +0700 Subject: [PATCH] fix(s3api): make post api upload object default return 204 (#5648) --- weed/s3api/s3api_object_handlers_postpolicy.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/weed/s3api/s3api_object_handlers_postpolicy.go b/weed/s3api/s3api_object_handlers_postpolicy.go index cd80e0ad3..e77d734ac 100644 --- a/weed/s3api/s3api_object_handlers_postpolicy.go +++ b/weed/s3api/s3api_object_handlers_postpolicy.go @@ -166,8 +166,10 @@ func (s3a *S3ApiServer) PostPolicyBucketHandler(w http.ResponseWriter, r *http.R s3err.PostLog(r, http.StatusCreated, s3err.ErrNone) case "200": s3err.WriteEmptyResponse(w, r, http.StatusOK) + case "204": + s3err.WriteEmptyResponse(w, r, http.StatusNoContent) default: - writeSuccessResponseEmpty(w, r) + s3err.WriteEmptyResponse(w, r, http.StatusNoContent) } }