]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
radosgw: fix zero sized chunked uploads with s3
authorMarcus Watts <mwatts@redhat.com>
Tue, 15 Aug 2017 03:56:21 +0000 (23:56 -0400)
committerAbhishek Lekshmanan <abhishek@suse.com>
Mon, 21 Aug 2017 10:12:58 +0000 (12:12 +0200)
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 <mwatts@redhat.com>
(cherry picked from commit 4d3d72fd1c5e0e3913ee9f9b7f8ce2bfe6d4b6fa)

src/rgw/rgw_rest.cc

index f67a076c6222acf8b37dd521e999e969cd722b6f..27cdaf1353e6c745c934a19b27af1f04c9f218a1 100644 (file)
@@ -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);