]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: don't call send_response() explicitly
authorYehuda Sadeh <yehuda@redhat.com>
Tue, 27 Jan 2015 23:24:03 +0000 (15:24 -0800)
committerYehuda Sadeh <yehuda@redhat.com>
Thu, 29 Jan 2015 17:31:35 +0000 (09:31 -0800)
This will make us send the response twice and clobber the http
state.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_op.cc

index fd4024ebd957bab7ca6b8eb026d1a5014d318911..e5589303b3546833231f802055ff5ad41b7d7e22 100644 (file)
@@ -1080,8 +1080,6 @@ void RGWGetBucketVersioning::execute()
 {
   versioned = s->bucket_info.versioned();
   versioning_enabled = s->bucket_info.versioning_enabled();
-
-  send_response();
 }
 
 int RGWSetBucketVersioning::verify_permission()
@@ -1102,7 +1100,7 @@ void RGWSetBucketVersioning::execute()
   ret = get_params();
 
   if (ret < 0)
-    goto done;
+    return;
 
   if (enable_versioning) {
     s->bucket_info.flags |= BUCKET_VERSIONED;
@@ -1114,11 +1112,8 @@ void RGWSetBucketVersioning::execute()
   ret = store->put_bucket_instance_info(s->bucket_info, false, 0, &s->bucket_attrs);
   if (ret < 0) {
     ldout(s->cct, 0) << "NOTICE: put_bucket_info on bucket=" << s->bucket.name << " returned err=" << ret << dendl;
-    goto done;
+    return;
   }
-
-done:
-  send_response();
 }
 
 int RGWStatBucket::verify_permission()