From: Marcus Watts Date: Tue, 15 Aug 2017 03:56:21 +0000 (-0400) Subject: radosgw: fix zero sized chunked uploads with s3 X-Git-Tag: v12.2.0~33^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=33673bca96982653674a515933658cb44f8addea;p=ceph.git 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) --- diff --git a/src/rgw/rgw_rest.cc b/src/rgw/rgw_rest.cc index f67a076c6222..27cdaf1353e6 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);