]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: check for status >= 0
authorYehuda Sadeh <yehuda@redhat.com>
Fri, 22 Apr 2016 00:24:16 +0000 (17:24 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Mon, 9 May 2016 23:00:14 +0000 (16:00 -0700)
Fixes: #15565
check only verified that status was > 0, so we ended not updating mtime for
the target object. This resulted in a continuous sync of objects.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit 255f19d9ef964536f2db17f70749f489330262a6)

src/rgw/rgw_rest_client.cc

index 73cc12999de0f111f54a151e4e22ce0b4460ceab..b219e6f154296b2b07a73ca35d8686174a87a30b 100644 (file)
@@ -692,7 +692,7 @@ int RGWRESTStreamRWRequest::get_resource(RGWAccessKey& key, map<string, string>&
 int RGWRESTStreamRWRequest::complete(string& etag, real_time *mtime, map<string, string>& attrs)
 {
   set_str_from_headers(out_headers, "ETAG", etag);
-  if (status > 0 && mtime) {
+  if (status >= 0 && mtime) {
     string mtime_str;
     set_str_from_headers(out_headers, "RGWX_MTIME", mtime_str);
     if (!mtime_str.empty()) {