Rocket/core/lib
Sergio Benitez ac0a77bae2 Allow dynamic parameters to match empty segments.
The net effect of this commit is three-fold:

  * A request to `/` now matches `/<a>`. `/foo/` matches `/<a>/<b>`.
  * A segment matched to a dynamic parameter may be empty.
  * A request to `/foo/` no longer matches `/foo` or `/<a>`. Instead,
    such a request would match `/foo/<a>` or `/foo/`.

The `&str` and `String` parameter guards were updated to reflect this
change: they now error, with a newly introduced error type `Empty` in
the `rocket::error` module, when the parameter is empty. As this was the
only built-in parameter guard that would be effected by this change (all
other guards already required nonempty parameters to succeed), the
majority of applications will see no effect as a result.

For applications wanting the previous functionality, a new
`AdHoc::uri_normalizer()` fairing was introduced.
2023-04-07 20:00:09 -07:00
..
fuzz Implement more conservative URI normalization. 2023-04-07 19:59:57 -07:00
src Allow dynamic parameters to match empty segments. 2023-04-07 20:00:09 -07:00
tests Implement 'De(Serialize)' for 'Status'. 2023-03-26 19:18:04 -07:00
Cargo.toml New version: 0.5.0-rc.3. 2023-03-23 16:56:17 -07:00
build.rs Migrate Rocket to Rust 2021 edition. 2022-04-19 18:35:38 -07:00