Now, RGW will send two HTTP responses when GetLifeCycle failed. The first one is
Error Respnse like 404, and the second is lifecycle rules. It will breaks s3 sdk
and s3 utilities.
Fixes: http://tracker.ceph.com/issues/19363
Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
(cherry picked from commit
c3c0c828da5a64ca896475c1b0c369fde1bbd76a)
end_header(s, this, "application/xml");
dump_start(s);
+ if (op_ret < 0)
+ return;
+
config.dump_xml(s->formatter);
rgw_flush_formatter_and_reset(s, s->formatter);
}