]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix response header of Swift API 14529/head
authortone-zhang <tone.zhang@linaro.org>
Thu, 6 Apr 2017 09:56:05 +0000 (17:56 +0800)
committerNathan Cutler <ncutler@suse.com>
Mon, 3 Jul 2017 10:51:42 +0000 (12:51 +0200)
Response header of Swift API returned by radosgw does not contain
"x-openstack-request-id", but Swift returns it. Enhance the
compatibility of radosgw.

Fixes: http://tracker.ceph.com/issues/19443
Signed-off-by: tone-zhang <tone.zhang@linaro.org>
(cherry picked from commit e96db213079ab5e026156ab4b38418d1d4c23d27)

src/rgw/rgw_rest.cc

index 2ca556e20b8df4d6d753a8ed1a2bba5b43024695..745f6753028d605d5c11e3965f424a8ff8279030 100644 (file)
@@ -644,6 +644,7 @@ void dump_trans_id(req_state *s)
 {
   if (s->prot_flags & RGW_REST_SWIFT) {
     dump_header(s, "X-Trans-Id", s->trans_id);
+    dump_header(s, "X-Openstack-Request-Id", s->trans_id);
   } else if (s->trans_id.length()) {
     dump_header(s, "x-amz-request-id", s->trans_id);
   }