]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
RGWCivetWeb::read_data: fix arguments to mg_read() call 21291/head
authorNathan Cutler <ncutler@suse.com>
Sun, 8 Apr 2018 19:59:04 +0000 (21:59 +0200)
committerNathan Cutler <ncutler@suse.com>
Sun, 8 Apr 2018 20:00:22 +0000 (22:00 +0200)
Fixes: http://tracker.ceph.com/issues/23596
Signed-off-by: Nathan Cutler <ncutler@suse.com>
src/rgw/rgw_civetweb.cc

index c28fac47652ef2d03ddda920937523e91d1a53c2..41bc61a684f155b970331df3a12d4c7af5b012b6 100644 (file)
@@ -57,7 +57,7 @@ size_t RGWCivetWeb::read_data(char *buf, size_t len)
     return 0;
   }
   for (c = 0; c < len; c += ret) {
-    ret = mg_read(conn, buf, len);
+    ret = mg_read(conn, buf+c, len-c);
     if (ret < 0) {
       throw rgw::io::Exception(EIO, std::system_category());
     }