mirror of
https://github.com/ceph/ceph
synced 2025-02-24 11:37:37 +00:00
Merge pull request #20120 from cbodley/wip-22797
rgw: fix for empty query string in beast frontend Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
This commit is contained in:
commit
720a759401
@ -65,11 +65,12 @@ void ClientIO::init_env(CephContext *cct)
|
||||
// split uri from query
|
||||
auto url = request.target();
|
||||
auto pos = url.find('?');
|
||||
auto query = url.substr(pos + 1);
|
||||
url = url.substr(0, pos);
|
||||
|
||||
if (pos != url.npos) {
|
||||
auto query = url.substr(pos + 1);
|
||||
env.set("QUERY_STRING", query.to_string());
|
||||
url = url.substr(0, pos);
|
||||
}
|
||||
env.set("REQUEST_URI", url.to_string());
|
||||
env.set("QUERY_STRING", query.to_string());
|
||||
env.set("SCRIPT_URI", url.to_string()); /* FIXME */
|
||||
|
||||
char port_buf[16];
|
||||
|
Loading…
Reference in New Issue
Block a user