From 33673bca96982653674a515933658cb44f8addea Mon Sep 17 00:00:00 2001 From: Marcus Watts Date: Mon, 14 Aug 2017 23:56:21 -0400 Subject: [PATCH] radosgw: fix zero sized chunked uploads with s3 s3 allows for zero sized objects, which can be created using chunked uploads. It is important to call "recv_body (and ChunkMeta::create_next()) even on zero sized objects, so that the proper chunk signature can be presented at signature verification time. Fixes: http://tracker.ceph.com/issues/21000 Signed-off-by: Marcus Watts (cherry picked from commit 4d3d72fd1c5e0e3913ee9f9b7f8ce2bfe6d4b6fa) --- src/rgw/rgw_rest.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_rest.cc b/src/rgw/rgw_rest.cc index f67a076c6222a..27cdaf1353e6c 100644 --- a/src/rgw/rgw_rest.cc +++ b/src/rgw/rgw_rest.cc @@ -1138,7 +1138,7 @@ int RGWPutObj_ObjStore::get_data(bufferlist& bl) } int len = 0; - if (cl) { + { ACCOUNTING_IO(s)->set_account(true); bufferptr bp(cl); -- 2.39.5