From 116f7d13b0521e188de45ff77fd8cc8731a3aa9d Mon Sep 17 00:00:00 2001 From: Maarten Deprez Date: Thu, 15 Aug 2024 17:05:26 +0200 Subject: [PATCH] Support deserializing paths to sequences: use "/{tail}*" syntax --- actix-router/src/de.rs | 2 +- actix-web/src/types/path.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/actix-router/src/de.rs b/actix-router/src/de.rs index 7c66fd465..039607977 100644 --- a/actix-router/src/de.rs +++ b/actix-router/src/de.rs @@ -692,7 +692,7 @@ mod tests { #[test] fn test_extract_seq() { let mut router = Router::<()>::build(); - router.path("/path/to/{tail:.*}", ()); + router.path("/path/to/{tail}*", ()); let router = router.finish(); let mut path = Path::new("/path/to/tail/with/slash%2fes"); diff --git a/actix-web/src/types/path.rs b/actix-web/src/types/path.rs index 624e4d331..772315966 100644 --- a/actix-web/src/types/path.rs +++ b/actix-web/src/types/path.rs @@ -68,7 +68,7 @@ use crate::{ /// } /// /// // extract `Tail` from a path using serde -/// #[get("/path/to/{tail:.*}")] +/// #[get("/path/to/{tail}*")] /// async fn index(info: web::Path) -> String { /// format!("Navigating to {}!", info.tail.join(" :: ")) /// }