Skip to content

Commit c8ca225

Browse files
authored
Merge pull request ceph#64963 from edwinzrodriguez/ceph-wip-72452
test/rgw: Refactor CORS configuration handling for S3
2 parents 9a453eb + ea4a52d commit c8ca225

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/test/test_cors.cc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -339,12 +339,10 @@ void send_cors(set<string> o, set<string> h,
339339
unsigned max_age){
340340
if(g_test->get_key_type() == KEY_TYPE_S3){
341341
RGWCORSRule rule(o, h, e, flags, max_age);
342-
RGWCORSConfiguration config;
343-
config.stack_rule(rule);
344342
stringstream ss;
345-
RGWCORSConfiguration_S3 *s3;
346-
s3 = static_cast<RGWCORSConfiguration_S3 *>(&config);
347-
s3->to_xml(ss);
343+
RGWCORSConfiguration_S3 s3(nullptr);
344+
s3.stack_rule(rule);
345+
s3.to_xml(ss);
348346

349347
g_test->send_request(string("PUT"), string("/" S3_BUCKET_NAME "?cors"), cors_read_xml,
350348
(void *)&ss, ss.str().length());

0 commit comments

Comments
 (0)