]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: use RGW_AMZ_META_PREFIX
authorYehuda Sadeh <yehuda@redhat.com>
Wed, 3 May 2017 21:53:33 +0000 (14:53 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Tue, 30 May 2017 20:26:58 +0000 (13:26 -0700)
instead of defining X_AMZ_META_PREFIX

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_rest_s3.cc

index a948cf1548f605aa802fd5a0aa9263e2762a4df8..5cc5a43a475cc4dbed75ab2dfda49e87025c68d6 100644 (file)
@@ -2748,14 +2748,13 @@ int RGWConfigBucketMetaSearch_ObjStore_S3::get_params()
       val = boost::algorithm::to_lower_copy(rgw_trim_whitespace(args[1]));
     }
 
-#define X_AMZ_META_PREFIX "x-amz-meta-"
-    if (!boost::algorithm::starts_with(key, X_AMZ_META_PREFIX)) {
-      s->err.message = string("invalid expression, key must start with '" X_AMZ_META_PREFIX "' : ") + expression;
+    if (!boost::algorithm::starts_with(key, RGW_AMZ_META_PREFIX)) {
+      s->err.message = string("invalid expression, key must start with '" RGW_AMZ_META_PREFIX "' : ") + expression;
       ldout(s->cct, 20) << s->err.message << dendl;
       return -EINVAL;
     }
 
-    key = key.substr(sizeof(X_AMZ_META_PREFIX) - 1);
+    key = key.substr(sizeof(RGW_AMZ_META_PREFIX) - 1);
 
     ESEntityTypeMap::EntityType entity_type;