Merge pull request #21291 from smithfarm/wip-23596

RGWCivetWeb::read_data: fix arguments to mg_read() call

Reviewed-by: Orit Wasserman <owasserm@redhat.com>
This commit is contained in:
Casey Bodley 2018-04-12 11:18:44 -04:00 committed by GitHub
commit 0851524679
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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());
}