]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rgw/rgw_website.cc
import ceph 14.2.5
[ceph.git] / ceph / src / rgw / rgw_website.cc
index a546b349fc734961c20b6afa5fbff46e0b276c19..13a3b1de9e36c137f9209d07163ad9c282b715cb 100644 (file)
@@ -107,8 +107,11 @@ bool RGWBucketWebsiteConf::should_redirect(const string& key, const int http_err
   return true;
 }
 
-void RGWBucketWebsiteConf::get_effective_key(const string& key, string *effective_key, bool is_file) const
+bool RGWBucketWebsiteConf::get_effective_key(const string& key, string *effective_key, bool is_file) const
 {
+  if (index_doc_suffix.empty()) {
+    return false;
+  }
 
   if (key.empty()) {
     *effective_key = index_doc_suffix;
@@ -119,4 +122,6 @@ void RGWBucketWebsiteConf::get_effective_key(const string& key, string *effectiv
   } else {
     *effective_key = key;
   }
+
+  return true;
 }