diff options
author | Javier M. Mellid <jmunhoz@igalia.com> | 2015-09-09 15:56:04 +0200 |
---|---|---|
committer | Javier M. Mellid <jmunhoz@igalia.com> | 2015-09-10 10:58:02 +0200 |
commit | c503e97b7f7e0349147629f78b1a17c77bcf9b0c (patch) | |
tree | f7f0e4e5b699bf2f8029a9a31caf2dc04d4e99a1 /src/rgw | |
parent | Merge pull request #5837 from tchaikov/wip-12968 (diff) | |
download | ceph-c503e97b7f7e0349147629f78b1a17c77bcf9b0c.tar.xz ceph-c503e97b7f7e0349147629f78b1a17c77bcf9b0c.zip |
rgw: include RequestId as part of the Error response
The RGW error responses must contain a RequestId to be compliant with
the Amazon S3 errors. This RequestId is the ID of the request associated
with the error.
Fixes: #13020
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Diffstat (limited to 'src/rgw')
-rw-r--r-- | src/rgw/rgw_rest.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rgw/rgw_rest.cc b/src/rgw/rgw_rest.cc index b7f51970d09..e2b1568247c 100644 --- a/src/rgw/rgw_rest.cc +++ b/src/rgw/rgw_rest.cc @@ -553,6 +553,8 @@ void end_header(struct req_state *s, RGWOp *op, const char *content_type, const s->formatter->dump_string("Code", s->err.s3_code); if (!s->err.message.empty()) s->formatter->dump_string("Message", s->err.message); + if (!s->trans_id.empty()) + s->formatter->dump_string("RequestId", s->trans_id); s->formatter->close_section(); dump_content_length(s, s->formatter->get_len()); } else { |