Skip to content

Commit

Permalink
Support deserializing paths to sequences: use "/{tail}*" syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
maartendeprez committed Aug 15, 2024
1 parent feee430 commit 116f7d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion actix-router/src/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion actix-web/src/types/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Tail>) -> String {
/// format!("Navigating to {}!", info.tail.join(" :: "))
/// }
Expand Down

0 comments on commit 116f7d1

Please sign in to comment.