aboutsummaryrefslogtreecommitdiff
path: root/src/api/helpers.rs
diff options
context:
space:
mode:
authortrinity-1686a <trinity.pointard@gmail.com>2021-12-06 15:17:47 +0100
committerAlex <alex@adnab.me>2021-12-06 15:17:47 +0100
commitc4ac8835d388b14e144b01599c0f1351bdb9e958 (patch)
treee2bdb8e9ef34ea01c13ee126728f7adac2642e6a /src/api/helpers.rs
parentccce75bc25a2827e23443ec65ceb6b409f4a55ae (diff)
downloadgarage-c4ac8835d388b14e144b01599c0f1351bdb9e958.tar.gz
garage-c4ac8835d388b14e144b01599c0f1351bdb9e958.zip
add proper request router for s3 api (#163)
fix #161 Current request router was organically grown, and is getting messier and messier with each addition. This router cover exaustively existing API endpoints (with exceptions listed in [#161(comment)](https://git.deuxfleurs.fr/Deuxfleurs/garage/issues/161#issuecomment-1773) either because new and old api endpoint can't feasabily be differentied, or it's more lambda than s3). Co-authored-by: Trinity Pointard <trinity.pointard@gmail.com> Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/163 Reviewed-by: Alex <alex@adnab.me> Co-authored-by: trinity-1686a <trinity.pointard@gmail.com> Co-committed-by: trinity-1686a <trinity.pointard@gmail.com>
Diffstat (limited to 'src/api/helpers.rs')
-rw-r--r--src/api/helpers.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/helpers.rs b/src/api/helpers.rs
index 2375d35d..c2709bb3 100644
--- a/src/api/helpers.rs
+++ b/src/api/helpers.rs
@@ -26,7 +26,7 @@ pub fn host_to_bucket<'a>(host: &'a str, root: &str) -> Option<&'a str> {
/// The HTTP host contains both a host and a port.
/// Extracting the port is more complex than just finding the colon (:) symbol due to IPv6
/// We do not use the collect pattern as there is no way in std rust to collect over a stack allocated value
-/// check here: https://docs.rs/collect_slice/1.2.0/collect_slice/
+/// check here: <https://docs.rs/collect_slice/1.2.0/collect_slice/>
pub fn authority_to_host(authority: &str) -> Result<String, Error> {
let mut iter = authority.chars().enumerate();
let (_, first_char) = iter