Remove leading / in keys; better delimiter handling

This commit is contained in:
Alex Auvolat
2020-04-24 22:28:15 +02:00
parent be4831d768
commit e3203f998b
2 changed files with 8 additions and 3 deletions
+1
View File
@@ -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),