mirror of
https://github.com/actix/actix-web.git
synced 2024-11-14 12:51:17 +00:00
168b2f227d
* compile time validation of path * added trybuild err message * Update Cargo.toml * add changelog entry * test more cases of path validation * fmt Co-authored-by: Rob Ede <robjtede@icloud.com>
33 lines
596 B
Rust
33 lines
596 B
Rust
use actix_web_codegen::get;
|
|
|
|
#[get("/{")]
|
|
async fn zero() -> &'static str {
|
|
"malformed resource def"
|
|
}
|
|
|
|
#[get("/{foo")]
|
|
async fn one() -> &'static str {
|
|
"malformed resource def"
|
|
}
|
|
|
|
#[get("/{}")]
|
|
async fn two() -> &'static str {
|
|
"malformed resource def"
|
|
}
|
|
|
|
#[get("/*")]
|
|
async fn three() -> &'static str {
|
|
"malformed resource def"
|
|
}
|
|
|
|
#[get("/{tail:\\d+}*")]
|
|
async fn four() -> &'static str {
|
|
"malformed resource def"
|
|
}
|
|
|
|
#[get("/{a}/{b}/{c}/{d}/{e}/{f}/{g}/{h}/{i}/{j}/{k}/{l}/{m}/{n}/{o}/{p}/{q}")]
|
|
async fn five() -> &'static str {
|
|
"malformed resource def"
|
|
}
|
|
|
|
fn main() {}
|