diff options
author | Alex Auvolat <alex@adnab.me> | 2020-04-24 22:28:15 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-04-24 22:28:15 +0200 |
commit | e3203f998b153d85199a322e8b6fee72a90c32c9 (patch) | |
tree | 254448980c2ccd1c340591fa11ec5adaea01f63f /src/api/api_server.rs | |
parent | be4831d7687b59eb4a8f7a2856554f9157cc998d (diff) | |
download | garage-e3203f998b153d85199a322e8b6fee72a90c32c9.tar.gz garage-e3203f998b153d85199a322e8b6fee72a90c32c9.zip |
Remove leading / in keys; better delimiter handling
Diffstat (limited to 'src/api/api_server.rs')
-rw-r--r-- | src/api/api_server.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/api/api_server.rs b/src/api/api_server.rs index f7ca156d..58ef9460 100644 --- a/src/api/api_server.rs +++ b/src/api/api_server.rs @@ -78,6 +78,7 @@ async fn handler_inner( let (bucket, key) = match path.find('/') { Some(i) => { let (bucket, key) = path.split_at(i); + let key = key.trim_start_matches('/'); (bucket, Some(key)) } None => (path, None), |