]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/rest: don't print empty x-amz-request-id 10674/head
authorMarcus Watts <mwatts@redhat.com>
Wed, 28 Oct 2015 15:43:30 +0000 (11:43 -0400)
committerMarcus Watts <mwatts@redhat.com>
Tue, 9 Aug 2016 21:35:37 +0000 (17:35 -0400)
I don't believe an empty string is ever a valid "x-amz-request-id" record.

Signed-off-by: Marcus Watts <mwatts@redhat.com>
src/rgw/rgw_rest.cc

index fc5b2f9c8e8e214c37d3a4acd3722422e8f26f0b..8512cc3238e27473f6d81ae08fbb7f23ea544510 100644 (file)
@@ -588,7 +588,7 @@ void dump_trans_id(req_state *s)
   if (s->prot_flags & RGW_REST_SWIFT) {
     STREAM_IO(s)->print("X-Trans-Id: %s\r\n", s->trans_id.c_str());
   }
-  else {
+  else if (s->trans_id.length()) {
     STREAM_IO(s)->print("x-amz-request-id: %s\r\n", s->trans_id.c_str());
   }
 }