File: route-malformed-path-fail.rs

package info (click to toggle)
rust-actix-web-codegen 4.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 272 kB
  • sloc: makefile: 2
file content (33 lines) | stat: -rw-r--r-- 596 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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() {}