Rocket/core/codegen/tests
Sergio Benitez fbd1a0d069 Improve forwarding status code precision.
Previously, the `NotFound` status code was used to signal many kinds of
recoverable, forwarding errors. This included validation errors, incorrect
Content-Type errors, and more.

This commit modifies the status code used to forward in these instances to more
precisely indicate the forwarding condition. In particular:

  * Parameter `FromParam` errors now forward as 422 (`UnprocessableEntity`).
  * Query paramater errors now forward as 422 (`UnprocessableEntity`).
  * Use of incorrect form content-type forwards as 413 (`UnsupportedMediaType`).
  * `WebSocket` guard now forwards as 400 (`BadRequest`).
  * `&Host`, `&Accept`, `&ContentType`, `IpAddr`, and `SocketAddr` all forward
    with a 500 (`InternalServerError`).

Additionally, the `IntoOutcome` trait was overhauled to support functionality
previously offered by methods on `Outcome`. The `Outcome::forward()` method now
requires a status code to use for the forwarding outcome.

Finally, logging of `Outcome`s now includes the relevant status code.

Resolves #2626.
2023-10-31 18:44:37 -05:00
..
ui-fail Implement more conservative URI normalization. 2023-04-07 19:59:57 -07:00
ui-fail-nightly Use Span::mixed_site to avoid let unit warnings. 2023-10-16 17:50:49 -07:00
ui-fail-stable Use Span::mixed_site to avoid let unit warnings. 2023-10-16 17:50:49 -07:00
async-entry.rs Revamp shutdown to recover shutdown 'Rocket'. 2022-05-07 06:12:24 -05:00
async-routes.rs Workaround 'rustc' bug, compiling more async code. 2021-08-24 19:46:47 -07:00
catcher.rs Add internal '__typed_stream' proc-macro. 2021-06-01 11:43:51 -07:00
expansion.rs Retrieve managed state via a borrow: '&State<T>'. 2021-05-11 08:58:16 -05:00
from_form.rs Remove use of 'private_in_public' lint. 2023-09-20 16:16:05 -07:00
from_form_field.rs Allow several 'field' attributes in all derives. 2021-04-07 23:09:05 -07:00
responder.rs Allow named field generics in 'UriDisplay' derive. 2021-07-01 06:02:40 -07:00
route-data.rs Drop 'Data' after sending a response, not before. 2021-06-08 13:26:16 -07:00
route-format.rs Impl 'IntoCollection' for '[T; N]'. 2021-05-22 11:01:00 -07:00
route-ranking.rs Rename 'rocket::ignite()' to 'rocket::build()'. 2021-04-08 01:07:52 -07:00
route-raw.rs Overhaul URI types, parsers, 'uri!' macro. 2021-05-19 18:47:11 -07:00
route.rs Improve forwarding status code precision. 2023-10-31 18:44:37 -05:00
segment-ignore.rs Rename 'rocket::ignite()' to 'rocket::build()'. 2021-04-08 01:07:52 -07:00
typed-uris.rs Introduce more flexible mounting. 2023-05-03 20:03:45 -07:00
ui-fail.rs Allow UI tests to fail in CI. 2023-01-30 16:06:18 -08:00
uri_display.rs Remove use of 'private_in_public' lint. 2023-09-20 16:16:05 -07:00