From 81f86c381dffd7a3fda9914b38f13c2b2f405345 Mon Sep 17 00:00:00 2001 From: chrislu Date: Mon, 7 Feb 2022 11:37:59 -0800 Subject: [PATCH] s3: avoid nil response fix https://github.com/chrislusf/seaweedfs/issues/2636 --- weed/s3api/s3api_object_multipart_handlers.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weed/s3api/s3api_object_multipart_handlers.go b/weed/s3api/s3api_object_multipart_handlers.go index 8cbaf9393..99c280e13 100644 --- a/weed/s3api/s3api_object_multipart_handlers.go +++ b/weed/s3api/s3api_object_multipart_handlers.go @@ -163,13 +163,13 @@ func (s3a *S3ApiServer) ListObjectPartsHandler(w http.ResponseWriter, r *http.Re UploadId: aws.String(uploadID), }) - glog.V(2).Infof("ListObjectPartsHandler %s count=%d", string(s3err.EncodeXMLResponse(response)), len(response.Part)) - if errCode != s3err.ErrNone { s3err.WriteErrorResponse(w, r, errCode) return } + glog.V(2).Infof("ListObjectPartsHandler %s count=%d", string(s3err.EncodeXMLResponse(response)), len(response.Part)) + writeSuccessResponseXML(w, r, response) }