]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: s3 PutObj sends status first
authorCasey Bodley <cbodley@redhat.com>
Sun, 19 Jun 2016 18:58:00 +0000 (14:58 -0400)
committerRadoslaw Zarzynski <rzarzynski@mirantis.com>
Fri, 21 Oct 2016 20:57:17 +0000 (22:57 +0200)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_rest_s3.cc

index 57c28fa205fee9c2b3186bbcc1afdd68f560d64f..35796d900805ef26c7cae124632dc5ae30e5e377 100644 (file)
@@ -1325,6 +1325,7 @@ void RGWPutObj_ObjStore_S3::send_response()
 {
   if (op_ret) {
     set_req_state_err(s, op_ret);
+    dump_errno(s);
   } else {
     if (s->cct->_conf->rgw_s3_success_create_obj_status) {
       op_ret = get_success_retcode(
@@ -1332,6 +1333,7 @@ void RGWPutObj_ObjStore_S3::send_response()
       set_req_state_err(s, op_ret);
     }
     if (!copy_source) {
+      dump_errno(s);
       dump_etag(s, etag.c_str());
       dump_content_length(s, 0);
     } else {
@@ -1357,7 +1359,6 @@ void RGWPutObj_ObjStore_S3::send_response()
   if (s->system_request && !real_clock::is_zero(mtime)) {
     dump_epoch_header(s, "Rgwx-Mtime", mtime);
   }
-  dump_errno(s);
   end_header(s, this);
 }