Rocket/core/lib/fuzz
Sergio Benitez 72c91958b7 Support routes that match any method.
This commit introduces support for method-less routes and route
attributes, which match _any_ valid method: `#[route("/")]`. The `Route`
structure's `method` field is now accordingly of type `Option<Route>`.

The syntax for the `route` attribute has changed in a breaking manner.
To set a method, a key/value of `method = NAME` must be introduced:

```rust
#[route("/", method = GET)]
```

If the method's name is a valid identifier, it can be used without
quotes. Otherwise it must be quoted:

```rust
// `GET` is a valid identifier, but `VERSION-CONTROL` is not
#[route("/", method = "VERSION-CONTROL")]
```

Closes #2731.
2024-08-24 03:00:52 -07:00
..
corpus Fuzz to validate routing collision safety. 2023-04-07 20:27:56 -07:00
targets Support routes that match any method. 2024-08-24 03:00:52 -07:00
.gitignore Fuzz URI parsing and display. 2021-06-06 21:52:44 -07:00
Cargo.toml Use workspace lints. Resolve new nightly warnings. 2024-05-20 13:39:14 -05:00
README.md Fuzz URI parsing and display. 2021-06-06 21:52:44 -07:00

README.md

Fuzzing

Install cargo-fuzz:

cargo install -f cargo-fuzz

Run any available target where $target is the name of the target and $n is the number of CPUs to use for fuzzing:

cargo fuzz list # get list of targets
cargo fuzz run $target -j $n