]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw: fix double slash (//) killing the gateway 36654/head
authorroot <root@cephdev.cern.ch>
Fri, 26 Jun 2020 10:44:45 +0000 (12:44 +0200)
committerNathan Cutler <ncutler@suse.com>
Sat, 15 Aug 2020 13:10:49 +0000 (15:10 +0200)
commita7f677fc8392a6ddcad14b41837d89a394e08a10
tree1f8df5fef084b5bdd0a09f56682ce20573acc8fd
parent35adebe94e8b0a17e7b56379a8bf24e5f7b8ced4
rgw: fix double slash (//) killing the gateway

When a bucket is inialized as a static website, a curl request on the bucket with double slash kills the gateway.
The problem is on the URL handling of the subdirectory, which tries to remove the last slash of any URL, so when only / is given as a sub-directory, this results to an empty string.

Fixes: https://tracker.ceph.com/issues/41225
Signed-off-by: Theofilos Mouratidis <t.mour@cern.ch>
(cherry picked from commit 626330c504b1af8393986bd0553786c3031422cd)
src/rgw/rgw_rest_s3.cc