Skip to content

Commit 954ca45

Browse files
authored
Merge pull request ceph#60970 from clwluvw/redirect-qs
rgw: append query string to redirect URL if present Reviewed-by: Casey Bodley <[email protected]>
2 parents ec81d4a + 8de984d commit 954ca45

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/rgw/rgw_rest.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -666,8 +666,10 @@ static void build_redirect_url(req_state *s, const string& redirect_base, string
666666
dest_uri = dest_uri.substr(0, dest_uri.size() - 1);
667667
}
668668
dest_uri += s->info.request_uri;
669-
dest_uri += "?";
670-
dest_uri += s->info.request_params;
669+
if (!s->info.request_params.empty()) {
670+
dest_uri += "?";
671+
dest_uri += s->info.request_params;
672+
}
671673
}
672674

673675
void abort_early(req_state *s, RGWOp* op, int err_no,

0 commit comments

Comments
 (0)