From: Casey Bodley Date: Tue, 4 Apr 2017 14:42:44 +0000 (-0400) Subject: rgw: fix for zonegroup redirect url X-Git-Tag: v11.2.1~47^2~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=4e4cd5453670af8d87b217c60dc84dd39e192952;p=ceph.git rgw: fix for zonegroup redirect url local dest_url variable was shadowing the one in the enclosing scope, so the changes were not applied and no Location header was written on redirect Fixes: http://tracker.ceph.com/issues/19488 Signed-off-by: Casey Bodley (cherry picked from commit 542e188a40f0495720b48308372366951ae41e62) --- diff --git a/src/rgw/rgw_rest.cc b/src/rgw/rgw_rest.cc index c3e119c874586..115f4c99718f5 100644 --- a/src/rgw/rgw_rest.cc +++ b/src/rgw/rgw_rest.cc @@ -775,7 +775,7 @@ void abort_early(struct req_state *s, RGWOp *op, int err_no, if (!s->redirect.empty()) { dest_uri = s->redirect; } else if (!s->zonegroup_endpoint.empty()) { - string dest_uri = s->zonegroup_endpoint; + dest_uri = s->zonegroup_endpoint; /* * reqest_uri is always start with slash, so we need to remove * the unnecessary slash at the end of dest_uri.