summaryrefslogtreecommitdiffstats
path: root/src/rgw/rgw_common.h
diff options
context:
space:
mode:
authorXinying Song <songxinying@cloudin.cn>2017-11-15 07:10:58 +0100
committerXinying Song <songxinying@cloudin.cn>2017-11-17 06:08:34 +0100
commitb4a937562a7ae909c2748980b5327189ccb8cdc0 (patch)
treeb89f7cb643d976dc82bd03663b8395a638340a60 /src/rgw/rgw_common.h
parentMerge pull request #18483 from Songweibin/wip-list-children2 (diff)
downloadceph-b4a937562a7ae909c2748980b5327189ccb8cdc0.tar.xz
ceph-b4a937562a7ae909c2748980b5327189ccb8cdc0.zip
rgw:send x-amz-version-id header when upload files
To be compatible with aws s3, an x-amz-version-id header should be returned. For atomic upload, RGWPutObj::version_id will stores the version-id either generated by rgw randomly or read from user. For multipart upload, RGWCompleteMultipart::version_id will stores the version-id either generated by rgw randomly or read from user. Function send_respones() will send 'x-amz-version-id' header when version_id is not empty. Signed-off-by: Xinying Song <songxinying@cloudin.cn>
Diffstat (limited to 'src/rgw/rgw_common.h')
-rw-r--r--src/rgw/rgw_common.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rgw/rgw_common.h b/src/rgw/rgw_common.h
index 37db621b092..508e566e70b 100644
--- a/src/rgw/rgw_common.h
+++ b/src/rgw/rgw_common.h
@@ -1537,6 +1537,10 @@ struct rgw_obj_key {
instance = i;
}
+ const string& get_instance() const {
+ return instance;
+ }
+
string get_index_key_name() const {
if (ns.empty()) {
if (name.size() < 1 || name[0] != '_') {