]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: include str_list.h for ceph::for_each_substr in CORS header
authorramin.najarbashi <ramin.najarbashi@gmail.com>
Mon, 8 Jun 2026 19:17:52 +0000 (22:47 +0330)
committerramin.najarbashi <ramin.najarbashi@gmail.com>
Mon, 22 Jun 2026 17:02:08 +0000 (20:32 +0330)
get_multi_cors_method_flags() calls ceph::for_each_substr(), but
rgw_cors.h did not include str_list.h. The CORS unit test includes
only this header, so the build failed with an undeclared identifier.
Qualify the call and add the missing include.

Signed-off-by: ramin.najarbashi <ramin.najarbashi@gmail.com>
(cherry picked from commit 830f0e562851a36abc2b450fcf0dd3e554abf24f)

src/rgw/rgw_cors.h

index c500fab29cb2c785a29320805162e6b1b0ee57d4..9b4fd0ee7ecb0b6acc5d118fe405eec228090e83 100644 (file)
@@ -18,6 +18,7 @@
 #include <map>
 #include <string>
 #include <include/types.h>
+#include "include/str_list.h"
 
 #define RGW_CORS_GET    0x1
 #define RGW_CORS_PUT    0x2
@@ -169,7 +170,7 @@ static inline uint8_t get_multi_cors_method_flags(const char *req_meth) {
     else if (method == "HEAD") flags |= RGW_CORS_HEAD;
     else if (method == "COPY") flags |= RGW_CORS_COPY;
   };
-  for_each_substr(allowed_methods, ";,= \t", apply_flag);
+  ceph::for_each_substr(allowed_methods, ";,= \t", apply_flag);
 
   return flags;
 }