Closed renovate[bot] closed 7 months ago
This PR contains the following updates:
=0.5.0-rc.3
=0.5.0
diff
`. - Fixed mismatched form field names in errors under certain conditions in [`FromForm`][FromForm] derive. - The [`FromForm`][FromForm] derive now collects *all* errors that occur. - Data pools are now gracefully shutdown in [`rocket_sync_db_pools`][rocket_sync_db_pools]. - Added [`Metadata::render()`][Metadata::render()] in [`rocket_dyn_templates`][rocket_dyn_templates] for direct template rendering. - Rocket salvages more information from malformed requests for error catchers. - The `cookie` `secure` feature is now properly conditionally enabled. - Data before encapsulation boundaries in TLS keys is allowed and ignored. - Support for TLS keys in SEC1 format was added. - Rocket now warns when a known secret key is configured. - A panic that could occur on shutdown in `rocket_sync_db_pools` was fixed. - Added a [`max_blocking`][max_blocking] configuration parameter to control number of blocking threads. - Added an [`ip_header`][ip_header] "real IP" header configuration parameter. - A [`pool()`][pool()] method is emitted by [`rocket_sync_db_pools`][rocket_sync_db_pools] for code-generated pools. - Data guards are now eligible [sentinels]. - Raw binary form field data can be retrieved using the `&[u8]` form guard. - Added [`TempFile::open()`][TempFile::open()] to stream `TempFile` data. - mTLS certificates can be set on local requests with [`LocalRequest::identity()`][LocalRequest::identity()]. - Added [`Error::pretty_print()`][Error::pretty_print()] for pretty-printing errors like Rocket. - Warnings are logged when data limits are reached. - A warning is emitted when `String` is used as a route parameter. - Configuration provenance information is logged under the `debug` log level. - Logging of `Outcome`s now includes the relevant status code. - `Span::mixed_site()` is used in codegen to reduce errant `clippy` warnings. ##### HTTP - Added support for HTTP/2, enabled by default via the `http2` crate feature. - Added a `const` constructor for `MediaType`. - Introduced [`RawStrBuf`][RawStrBuf], an owned `RawStr`. - Added many new "pattern" methods to [`RawStr`][RawStr]. - Added [`RawStr::percent_encode()`][RawStr::percent_encode()] and [`RawStr::strip()`][RawStr::strip()]. - Added support for unencoded query characters in URIs that are frequently sent by browsers. - Introduced [`Host`][Host] and [`&Host`][&Host] request guards. - Added [`RawStr::percent_encode_bytes()`][RawStr::percent_encode_bytes()]. - `NODELAY` is now enabled on all connections by default. - The TLS implementation handles handshakes off the main task, improving DoS resistance. ##### Known Media Types - Added AVIF: `image/avif`. - Added `EventStream`: `text/event-stream`. - Added `Markdown`: `text/markdown`. - Added `MP3`: `audio/mpeg`. - Added `CBZ`: `application/vnd.comicbook+zip`, extension `.cbz`. - Added `CBR`: `application/vnd.comicbook-rar`, extension `.cbr`. - Added `RAR`: `application/vnd.rar`, extension `.rar`. - Added `EPUB`: `application/epub+zip`, extension `.epub`. - Added `OPF`: `application/oebps-package+xml`, extension `.opf`. - Added `XHTML`: `application/xhtml+xml`, extension `.xhtml`. - Added `Text` as an alias for the `Plain` media type. - Added `Bytes` as an alias for the `Binary` media type. - Added `.mjs` as known JavaScript extension. - Added '.exe', '.iso', '.dmg' as known extensions. ##### Request - Added support for all UTF-8 characters in route paths. - Added support for percent-encoded `:` in socket or IP address values in \[`FromFormValue`]. - Added [`Request::rocket()`][Request::rocket()] to access the active `Rocket` instance. - `Request::uri()` now returns an `&Origin<'r>` instead of `&Origin<'_>`. - `Request::accept()`, `Request::content_type()` reflect changes to `Accept`, `Content-Type`. - `Json`, `MsgPack` accept `T: Deserialize`, not only `T: DeserializeOwned`. - Diesel SQLite connections in `rocket_sync_db_pools` use better defaults. - The default number of workers for synchronous database pools is now `workers * 4`. - Added [`Request::host()`][Request::host()] to retrieve the client-requested host. ##### Response - Added [`Template::try_custom()`][Template::try_custom()] for fallible template engine customization. - Manually registered templates can now be rendered with `Template::render()`. - Added support for the `X-DNS-Prefetch-Control` header to `Shield`. - Added support for manually-set `expires` values for private cookies. - Added support for type generics and custom generic bounds to [`#[derive(Responder)]`](https://api.rocket.rs/v0.5/rocket/derive.Responder.html). - The `Server` header is only set if one isn't already set. - Accurate `Content-Length` headers are sent even for partially read `Body`s. - [`Redirect`][Redirect] now accepts a `TryFrom`, allowing fragment parts. ##### Trait Implementations - Implemented `Clone` for `State`. - Implemented `Copy` and `Clone` for `fairing::Info`. - Implemented `Debug` for `Rocket` and `Client`. - Implemented `Default` for `Status` (returns `Status::Ok`). - Implemented `PartialEq`, `Eq`, `Hash`, `PartialOrd`, and `Ord` for `Status`. - Implemented `Eq`, `Hash`, and `PartialEq<&str>` for `Origin`. - Implemented `PartialEq>>` for `RawStr`. - Implemented `std::error::Error` for `Error`. - Implemented `Deref` and `DerefMut` for `LocalRequest` (to `Request`). - Implemented `DerefMut` for `Form`, `LenientForm`. - Implemented `From` for `Json`, `MsgPack`. - Implemented `TryFrom` and `TryFrom<&str>` for `Origin`. - Implemented `TryFrom` for each of the specific URI variants. - Implemented `FromRequest` for `&Config`. - Implemented `FromRequest` for `IpAddr`. - Implemented `FromParam` for `PathBuf` - Implemented `FromParam`, `FromData`, and `FromForm` for `&str`. - Implemented `FromForm` for `Json`, `MsgPack`. - Implemented `FromFormField` for `Cow` and `Capped>` - Implemented `Responder` for `tokio::fs::File`. - Implemented `Responder` for `(ContentType, R) where R: Responder`. - Implemented `Responder` for `(Status, R) where R: Responder` which overrides `R`'s status. - Implemented `Responder` for `std::io::Error` (behaves as `Debug`). - Implemented `Responder` for `Either`, equivalently to `Result`. - Implemented `Serialize` for `Flash`. - Implemented `Serialize`, `Deserialize`, `UriDisplay` and `FromUriParam` for `uuid::Uuid` - Implemented `Serialize`, `Deserialize` for `RawStr`. - Implemented `Serialize`, `Deserialize` for all URI types. - Implemented `Responder` for `Arc`, `Box` where `T: Responder`. - Implemented `Serialize` and `Deserialize` for [`Method`][Method]. - Implemented `Eq` for [`MediaType`][MediaType] and [`ContentType`][ContentType]. - Implemented `Responder` for `Box`. - Implemented `FromForm` for `Arc`. - Implemented `Fairing` for `Arc`. - Implemented `Serialize` and `Deserialize` for `Status`. ##### Dependency Changes - `serde` was introduced (`1.0`). - `futures` was introduced (`0.3`). - `binascii` was introduced (`0.1`). - `ref-cast` was introduced (`1.0`). - `atomic` was introduced (`0.5`). - `parking_lot` was introduced (`0.11`). - `ubtye` was introduced (`0.10`). - `figment` was introduced (`0.10`). - `rand` was introduced (`0.8`). - `either` was introduced (`1.0`). - `pin-project-lite` was introduced (`0.2`). - `indexmap` was introduced (`2.0`). - `tempfile` was introduced (`3.0`). - `async-trait` was introduced (`0.1`). - `async-stream` was introduced (`0.3`). - `multer` was introduced (`2.0`). - `tokio` was introduced (`1.6.1`). - `tokio-util` was introduced (`0.6`). - `tokio-stream` was introduced (`0.1.6`). - `bytes` was introduced (`1.0`). - `normpath` was introduced (`1`). - `state` was updated to `0.6`. - `rmp-serde` was updated to `0.15`. - `uuid` was updated to `0.8`. - `tera` was updated to `1.10`. - `postgres` was updated to `0.19`. - `rusqlite` was updated to `0.25`. - `r2d2_sqlite` was updated to `0.18`. - `time` was updated to `0.3`. - `handlebars` was updated to `4.0`. - `memcache` was updated to `0.16`. - `rustls` was updated to `0.21`. - `tokio-rustls` was updated to `0.24`. - `syn` was updated to `2`. - `diesel` was updated to `2.0`. - `sqlx` was updated to `0.7`. - `notify` was updated to `6`. - `criterion` was updated to `0.4`. - `cookie` was updated to `0.18`. - `yansi` was updated to `1.0`. - `atty` was removed. #### Infrastructure The following changes were made to the project's infrastructure: - Rocket now uses the 2021 edition of Rust. - Added a [v0.4 to v0.5 migration guide] and [FAQ] to Rocket's website. - Added visible `use` statements to examples in the guide. - Split examples into a separate workspace for easier testing. - Updated documentation for all changes. - Fixed many typos, errors, and broken links throughout documentation and examples. - Improved the general robustness of macros, and the quality and frequency of error messages. - Benchmarks now use `criterion` and datasets extracted from real-world projects. - Fixed the SPDX license expressions in `Cargo.toml` files. - Added support to `test.sh` for a `+` flag (e.g. `+stable`) to pass to `cargo`. - Added support to `test.sh` for extra flags to be passed on to `cargo`. - UI tests are now allowed to fail by the CI to avoid false negatives. - The GitHub CI workflow was updated to use maintained actions. - The CI now frees disk space before proceeding to avoid out-of-disk errors. - All workspaces now use `resolver = 2`. [phase]: https://api.rocket.rs/v0.5/rocket/struct.Rocket.html#phases [`async`/`await`]: https://rocket.rs/v0.5/guide/overview/#async-routes [compilation on Rust's stable]: https://rocket.rs/v0.5/guide/getting-started/#installing-rust [Feature-complete forms support]: https://rocket.rs/v0.5/guide/requests/#forms [configuration system]: https://rocket.rs/v0.5/guide/configuration/#configuration [graceful shutdown]: https://api.rocket.rs/v0.5/rocket/config/struct.Shutdown.html#summary [asynchronous testing]: https://rocket.rs/v0.5/guide/testing/#asynchronous-testing [UTF-8 characters]: https://rocket.rs/v0.5/guide/requests/#static-parameters [ignorable segments]: https://rocket.rs/v0.5/guide/requests/#ignored-segments [Catcher scoping]: https://rocket.rs/v0.5/guide/requests/#scoping [ad-hoc validation]: https://rocket.rs/v0.5/guide/requests#ad-hoc-validation [incoming data limits]: https://rocket.rs/v0.5/guide/requests/#streaming [build phases]: https://api.rocket.rs/v0.5/rocket/struct.Rocket.html#phases [Singleton fairings]: https://api.rocket.rs/v0.5/rocket/fairing/trait.Fairing.html#singletons [features into core]: https://api.rocket.rs/v0.5/rocket/index.html#features [features of `rocket`]: https://api.rocket.rs/v0.5/rocket/index.html#features [Data limit declaration in SI units]: https://api.rocket.rs/v0.5/rocket/data/struct.ByteUnit.html [support for `serde`]: https://api.rocket.rs/v0.5/rocket/serde/index.html [automatic typed config extraction]: https://api.rocket.rs/v0.5/rocket/fairing/struct.AdHoc.html#method.config [misconfigured secrets]: https://api.rocket.rs/v0.5/rocket/config/struct.SecretKey.html [default ranking colors]: https://rocket.rs/v0.5/guide/requests/#default-ranking [`chat`]: https://togithub.com/rwf2/Rocket/tree/v0.5/examples/chat [`Form` guard]: https://api.rocket.rs/v0.5/rocket/form/struct.Form.html [`Strict`]: https://api.rocket.rs/v0.5/rocket/form/struct.Strict.html [`CookieJar`#pending]: https://api.rocket.rs/v0.5/rocket/http/struct.CookieJar.html#pending [`rocket::serde::json`]: https://api.rocket.rs/v0.5/rocket/serde/json/index.html [`rocket::serde::msgpack`]: https://api.rocket.rs/v0.5/rocket/serde/msgpack/index.html [`rocket::serde::uuid`]: https://api.rocket.rs/v0.5/rocket/serde/uuid/index.html [`rocket::shield`]: https://api.rocket.rs/v0.5/rocket/shield/index.html [`rocket::fs`]: https://api.rocket.rs/v0.5/rocket/fs/index.html [`async run()`]: https://api.rocket.rs/v0.5/rocket_sync_db_pools/index.html#handlers [`LocalRequest::json()`]: https://api.rocket.rs/v0.5/rocket/local/blocking/struct.LocalRequest.html#method.json [`LocalRequest::msgpack()`]: https://api.rocket.rs/v0.5/rocket/local/blocking/struct.LocalRequest.html#method.msgpack [`LocalResponse::json()`]: https://api.rocket.rs/v0.5/rocket/local/blocking/struct.LocalResponse.html#method.json [`LocalResponse::msgpack()`]: https://api.rocket.rs/v0.5/rocket/local/blocking/struct.LocalResponse.html#method.msgpack [hierarchical data limits]: https://api.rocket.rs/v0.5/rocket/data/struct.Limits.html#hierarchy [default form field values]: https://rocket.rs/v0.5/guide/requests/#defaults [`Config::ident`]: https://api.rocket.rs/rocket/struct.Config.html#structfield.ident [`tokio`]: https://tokio.rs/ [Figment]: https://docs.rs/figment/0.10/figment/ [`TempFile`]: https://api.rocket.rs/v0.5/rocket/fs/enum.TempFile.html [`Contextual`]: https://rocket.rs/v0.5/guide/requests/#context [`Capped`]: https://api.rocket.rs/v0.5/rocket/data/struct.Capped.html [default catchers]: https://rocket.rs/v0.5/guide/requests/#default-catchers [URI types]: https://api.rocket.rs/v0.5/rocket/http/uri/index.html [`uri!`]: https://api.rocket.rs/v0.5/rocket/macro.uri.html [`Reference`]: https://api.rocket.rs/v0.5/rocket/http/uri/struct.Reference.html [`Asterisk`]: https://api.rocket.rs/v0.5/rocket/http/uri/struct.Asterisk.html [`Redirect`]: https://api.rocket.rs/v0.5/rocket/response/struct.Redirect.html [`UriDisplayQuery`]: https://api.rocket.rs/v0.5/rocket/derive.UriDisplayQuery.html [`Shield`]: https://api.rocket.rs/v0.5/rocket/shield/struct.Shield.html [Sentinels]: https://api.rocket.rs/v0.5/rocket/trait.Sentinel.html [`local_cache!`]: https://api.rocket.rs/v0.5/rocket/request/macro.local_cache.html [`local_cache_once!`]: https://api.rocket.rs/v0.5/rocket/request/macro.local_cache_once.html [`CookieJar`]: https://api.rocket.rs/v0.5/rocket/http/struct.CookieJar.html [asynchronous streams]: https://rocket.rs/v0.5/guide/responses/#async-streams [Server-Sent Events]: https://api.rocket.rs/v0.5/rocket/response/stream/struct.EventStream.html [`fs::relative!`]: https://api.rocket.rs/v0.5/rocket/fs/macro.relative.html [notification]: https://api.rocket.rs/v0.5/rocket/struct.Shutdown.html [`Rocket`]: https://api.rocket.rs/v0.5/rocket/struct.Rocket.html [`rocket::build()`]: https://api.rocket.rs/v0.5/rocket/struct.Rocket.html#method.build [`Rocket::ignite()`]: https://api.rocket.rs/v0.5/rocket/struct.Rocket.html#method.ignite [`Rocket::launch()`]: https://api.rocket.rs/v0.5/rocket/struct.Rocket.html#method.launch [`Request::rocket()`]: https://api.rocket.rs/v0.5/rocket/request/struct.Request.html#method.rocket [Fairings]: https://rocket.rs/v0.5/guide/fairings/ [configuration system]: https://rocket.rs/v0.5/guide/configuration/ [`Poolable`]: https://api.rocket.rs/v0.5/rocket_sync_db_pools/trait.Poolable.html [`Config`]: https://api.rocket.rs/v0.5/rocket/struct.Config.html [`Error`]: https://api.rocket.rs/v0.5/rocket/struct.Error.html [`LogLevel`]: https://api.rocket.rs/v0.5/rocket/config/enum.LogLevel.html [`Rocket::register()`]: https://api.rocket.rs/v0.5/rocket/struct.Rocket.html#method.register [`NamedFile::open`]: https://api.rocket.rs/v0.5/rocket/fs/struct.NamedFile.html#method.open [`Request::local_cache_async()`]: https://api.rocket.rs/v0.5/rocket/request/struct.Request.html#method.local_cache_async [`FromRequest`]: https://api.rocket.rs/v0.5/rocket/request/trait.FromRequest.html [`Fairing`]: https://api.rocket.rs/v0.5/rocket/fairing/trait.Fairing.html [`catcher::Handler`]: https://api.rocket.rs/v0.5/rocket/catcher/trait.Handler.html [`route::Handler`]: https://api.rocket.rs/v0.5/rocket/route/trait.Handler.html [`FromData`]: https://api.rocket.rs/v0.5/rocket/data/trait.FromData.html [`AsyncRead`]: https://docs.rs/tokio/1/tokio/io/trait.AsyncRead.html [`AsyncSeek`]: https://docs.rs/tokio/1/tokio/io/trait.AsyncSeek.html [`rocket::local::asynchronous`]: https://api.rocket.rs/v0.5/rocket/local/asynchronous/index.html [`rocket::local::blocking`]: https://api.rocket.rs/v0.5/rocket/local/blocking/index.html [`Outcome`]: https://api.rocket.rs/v0.5/rocket/outcome/enum.Outcome.html [`rocket::outcome::try_outcome!`]: https://api.rocket.rs/v0.5/rocket/outcome/macro.try_outcome.html [`Result` implements `Responder`]: https://api.rocket.rs/v0.5/rocket/response/trait.Responder.html#provided-implementations [`Debug`]: https://api.rocket.rs/v0.5/rocket/response/struct.Debug.html [`std::convert::Infallible`]: https://doc.rust-lang.org/stable/std/convert/enum.Infallible.html [`ErrorKind::Collisions`]: https://api.rocket.rs/v0.5/rocket/error/enum.ErrorKind.html#variant.Collisions [`rocket::http::uri::fmt`]: https://api.rocket.rs/v0.5/rocket/http/uri/fmt/index.html [`Data::open()`]: https://api.rocket.rs/v0.5/rocket/data/struct.Data.html#method.open [`DataStream`]: https://api.rocket.rs/v0.5/rocket/data/struct.DataStream.html [`rocket::form`]: https://api.rocket.rs/v0.5/rocket/form/index.html [`FromFormField`]: https://api.rocket.rs/v0.5/rocket/form/trait.FromFormField.html [`FromForm`]: https://api.rocket.rs/v0.5/rocket/form/trait.FromForm.html [`FlashMessage`]: https://api.rocket.rs/v0.5/rocket/request/type.FlashMessage.html [`Flash`]: https://api.rocket.rs/v0.5/rocket/response/struct.Flash.html [`rocket::State`]: https://api.rocket.rs/v0.5/rocket/struct.State.html [`Segments` and `Segments`]: https://api.rocket.rs/v0.5/rocket/http/uri/struct.Segments.html [`Route::map_base()`]: https://api.rocket.rs/v0.5/rocket/route/struct.Route.html#method.map_base [`uuid` support]: https://api.rocket.rs/v0.5/rocket/serde/uuid/index.html [`json`]: https://api.rocket.rs/v0.5/rocket/serde/json/index.html [`msgpack`]: https://api.rocket.rs/v0.5/rocket/serde/msgpack/index.html [`rocket::serde::json::json!`]: https://api.rocket.rs/v0.5/rocket/serde/json/macro.json.html [`rocket::shield::Shield`]: https://api.rocket.rs/v0.5/rocket/shield/struct.Shield.html [`rocket::fs::FileServer`]: https://api.rocket.rs/v0.5/rocket/fs/struct.FileServer.html [`rocket_dyn_templates`]: https://api.rocket.rs/v0.5/rocket_dyn_templates/index.html [`rocket_sync_db_pools`]: https://api.rocket.rs/v0.5/rocket_sync_db_pools/index.html [multitasking]: https://rocket.rs/v0.5/guide/overview/#multitasking [`Created`]: https://api.rocket.rs/v0.5/rocket/response/status/struct.Created.html [`Created::tagged_body`]: https://api.rocket.rs/v0.5/rocket/response/status/struct.Created.html#method.tagged_body [raw identifiers]: https://doc.rust-lang.org/1.51.0/book/appendix-01-keywords.html#raw-identifiers [`Rocket::config()`]: https://api.rocket.rs/v0.5/rocket/struct.Rocket.html#method.config [`Rocket::figment()`]: https://api.rocket.rs/v0.5/rocket/struct.Rocket.html#method.figment [`Rocket::state()`]: https://api.rocket.rs/v0.5/rocket/struct.Rocket.html#method.state [`Rocket::catchers()`]: https://api.rocket.rs/v0.5/rocket/struct.Rocket.html#method.catchers [`LocalRequest::inner_mut()`]: https://api.rocket.rs/v0.5/rocket/local/blocking/struct.LocalRequest.html#method.inner_mut [`RawStrBuf`]: https://api.rocket.rs/v0.5/rocket/http/struct.RawStrBuf.html [`RawStr`]: https://api.rocket.rs/v0.5/rocket/http/struct.RawStr.html [`RawStr::percent_encode()`]: https://api.rocket.rs/v0.5/rocket/http/struct.RawStr.html#method.percent_encode [`RawStr::percent_encode_bytes()`]: https://api.rocket.rs/v0.5/rocket/http/struct.RawStr.html#method.percent_encode_bytes [`RawStr::strip()`]: https://api.rocket.rs/v0.5/rocket/http/struct.RawStr.html#method.strip_prefix [`rocket::catcher`]: https://api.rocket.rs/v0.5/rocket/catcher/index.html [`rocket::route`]: https://api.rocket.rs/v0.5/rocket/route/index.html [`Segments::prefix_of()`]: https://api.rocket.rs/v0.5/rocket/http/uri/struct.Segments.html#method.prefix_of [`Template::try_custom()`]: https://api.rocket.rs/v0.5/rocket_dyn_templates/struct.Template.html#method.try_custom [`Template::custom`]: https://api.rocket.rs/v0.5/rocket_dyn_templates/struct.Template.html#method.custom [`FileServer::new()`]: https://api.rocket.rs/v0.5/rocket/fs/struct.FileServer.html#method.new [`content`]: https://api.rocket.rs/v0.5/rocket/response/content/index.html [`rocket_db_pools`]: https://api.rocket.rs/v0.5/rocket_db_pools/index.html [mutual TLS]: https://rocket.rs/v0.5/guide/configuration/#mutual-tls [`Certificate`]: https://api.rocket.rs/v0.5/rocket/mtls/struct.Certificate.html [`MediaType::with_params()`]: https://api.rocket.rs/v0.5/rocket/http/struct.MediaType.html#method.with_params [`ContentType::with_params()`]: https://api.rocket.rs/v0.5/rocket/http/struct.ContentType.html#method.with_params [`Host`]: https://api.rocket.rs/v0.5/rocket/http/uri/struct.Host.html [`&Host`]: https://api.rocket.rs/v0.5/rocket/http/uri/struct.Host.html [`Request::host()`]: https://api.rocket.rs/v0.5/rocket/request/struct.Request.html#method.host [`context!`]: https://api.rocket.rs/v0.5/rocket_dyn_templates/macro.context.html [`MediaType`]: https://api.rocket.rs/v0.5/rocket/http/struct.MediaType.html [`ContentType`]: https://api.rocket.rs/v0.5/rocket/http/struct.ContentType.html [`Method`]: https://api.rocket.rs/v0.5/rocket/http/enum.Method.html [`(ContentType, T)`]: https://api.rocket.rs/v0.5/rocket/response/content/index.html#usage [v0.4 to v0.5 migration guide]: https://rocket.rs/v0.5/guide/upgrading/ [contrib deprecation upgrade guide]: https://rocket.rs/v0.5/guide/upgrading/#contrib-deprecation [FAQ]: https://rocket.rs/v0.5/guide/faq/ [`Rocket::launch()`]: https://api.rocket.rs/v0.5/rocket/struct.Rocket.html#method.launch [`ErrorKind::Shutdown`]: https://api.rocket.rs/v0.5/rocket/error/enum.ErrorKind.html#variant.Shutdown [shutdown fairings]: https://api.rocket.rs/v0.5/rocket/fairing/trait.Fairing.html#shutdown [`Client::terminate()`]: https://api.rocket.rs/v0.5/rocket/local/blocking/struct.Client.html#method.terminate [`rocket::execute()`]: https://api.rocket.rs/v0.5/rocket/fn.execute.html [`CookieJar::get_pending()`]: https://api.rocket.rs/v0.5/rocket/http/struct.CookieJar.html#method.get_pending [`Metadata::render()`]: https://api.rocket.rs/v0.5/rocket_dyn_templates/struct.Metadata.html#method.render [`pool()`]: https://api.rocket.rs/v0.5/rocket_sync_db_pools/example/struct.ExampleDb.html#method.pool [`Request::client_ip()`]: https://api.rocket.rs/v0.5/rocket/request/struct.Request.html#method.client_ip [`max_blocking`]: https://api.rocket.rs/v0.5/rocket/struct.Config.html#structfield.max_blocking [`ip_header`]: https://api.rocket.rs/v0.5/rocket/struct.Config.html#structfield.ip_header [`LocalRequest::identity()`]: https://api.rocket.rs/v0.5/rocket/local/blocking/struct.LocalRequest.html#method.identity [`TempFile::open()`]: https://api.rocket.rs/v0.5/rocket/fs/enum.TempFile.html#method.open [`Error::pretty_print()`]: https://api.rocket.rs/v0.5/rocket/struct.Error.html#method.pretty_print [Request connection upgrade APIs]: https://api.rocket.rs/v0.5/rocket/struct.Response.html#upgrading [`rocket_ws`]: https://api.rocket.rs/v0.5/rocket_ws/ [registering]: https://api.rocket.rs/v0.5/rocket/response/struct.Response.html#method.add_upgrade [`IoHandler`]: https://api.rocket.rs/v0.5/rocket/data/trait.IoHandler.html [`response::status`]: https://api.rocket.rs/v0.5/rocket/response/status/index.html [Custom form errors]: https://api.rocket.rs/v0.5/rocket/form/error/enum.ErrorKind.html#variant.Custom [`request::Outcome`]: https://api.rocket.rs/v0.5/rocket/request/type.Outcome.html#variant.Forward [Route `Forward` outcomes]: https://api.rocket.rs/v0.5/rocket/request/type.Outcome.html#variant.Forward [`Outcome::Error`]: https://api.rocket.rs/v0.5/rocket/outcome/enum.Outcome.html#variant.Error [`IntoOutcome`]: https://api.rocket.rs/v0.5/rocket/outcome/trait.IntoOutcome.html [`MediaType::JavaScript`]: https://api.rocket.rs/v0.5/rocket/http/struct.MediaType.html#associatedconstant.JavaScript [`TempFile::open()`]: https://api.rocket.rs/v0.5/rocket/fs/enum.TempFile.html#method.open [`Error::pretty_print()`]: https://api.rocket.rs/v0.5/rocket/struct.Error.html#method.pretty_print [`RouteUri`]: https://api.rocket.rs/v0.5/rocket/route/struct.RouteUri.html ### [`v0.5.0-rc.4`](https://togithub.com/rwf2/Rocket/releases/tag/v0.5.0-rc.4): Rocket v0.5.0-rc.4 [Compare Source](https://togithub.com/SergioBenitez/Rocket/compare/v0.5.0-rc.3...v0.5.0-rc.4) See the [CHANGELOG](https://togithub.com/SergioBenitez/Rocket/blob/v0.5.0-rc.4/CHANGELOG.md), [news article](https://rocket.rs/v0.5-rc/news/2023-11-01-version-0.5-rc.4/), [migration guide](https://rocket.rs/v0.5-rc/guide/upgrading/), and [FAQ](https://rocket.rs/v0.5-rc/guide/faq/) for more information.
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
â™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.
This PR contains the following updates:
=0.5.0-rc.3
->=0.5.0
Release Notes
SergioBenitez/Rocket (rocket)
### [`v0.5.0`](https://togithub.com/SergioBenitez/Rocket/blob/HEAD/CHANGELOG.md#Version-050-Nov-17-2023) [Compare Source](https://togithub.com/SergioBenitez/Rocket/compare/v0.5.0-rc.4...v0.5.0) #### Major Features and Improvements This release introduces the following major features and improvements: - Support for [compilation on Rust's stable] release channel. - A rewritten, fully asynchronous core with support for [`async`/`await`][async/await]. - WebSocket support via [`rocket_ws`][rocket_ws]. - [Feature-complete forms support] including multipart, collections, [ad-hoc validation], and [context](https://rocket.rs/v0.5/guide/requests/#context). - [Sentinels]: automatic verification of application state at start-up to prevent runtime errors. - [Graceful shutdown] with configurable signaling, grace periods, [notification], and [shutdown fairings]. - An entirely new, flexible and robust [configuration system] based on [Figment]. - Typed [asynchronous streams] and [Server-Sent Events] with generator syntax. - Asynchronous database pooling support via [`rocket_db_pools`][rocket_db_pools]. - Support for [mutual TLS] and client [`Certificate`][Certificate]s. - Automatic support for HTTP/2 including `h2` ALPN. - Graduation of `json`, `msgpack`, and `uuid` `rocket_contrib` [features into core]. - An automatically enabled [`Shield`][Shield]: security and privacy headers for all responses. - Type-system enforced [incoming data limits] to mitigate memory-based DoS attacks. - Compile-time URI literals via a fully revamped [`uri!`][uri!] macro. - [Request connection upgrade APIs] with support for raw I/O with the client. - Full support for [UTF-8 characters] in routes and catchers. - Precise detection of missing managed state, databases, and templating with [sentinels]. - Typed [build phases] with strict application-level guarantees. - [Ignorable segments]: wildcard route matching with no typing restrictions. - First-class [support for `serde`][support for serde] for built-in guards and types. - New application launch attributes: [`#[launch]`](https://api.rocket.rs/v0.5/rocket/attr.launch.html) and [`#[rocket::main]`](https://api.rocket.rs/v0.5/rocket/attr.main.html). - [Default catchers] via `#[catch(default)]`, which handle *any* status code. - [Catcher scoping] to narrow the scope of a catcher to a URI prefix. - Built-in libraries and support for [asynchronous testing]. - A [`TempFile`][TempFile] data and form guard for automatic uploading to a temporary file. - A [`CappedSee a
```diff - #![feature(proc_macro_hygiene, decl_macro)] - #[macro_use] extern crate rocket; #[get("/diff
of the changes from v0.4.`. - Fixed mismatched form field names in errors under certain conditions in [`FromForm`][FromForm] derive. - The [`FromForm`][FromForm] derive now collects *all* errors that occur. - Data pools are now gracefully shutdown in [`rocket_sync_db_pools`][rocket_sync_db_pools]. - Added [`Metadata::render()`][Metadata::render()] in [`rocket_dyn_templates`][rocket_dyn_templates] for direct template rendering. - Rocket salvages more information from malformed requests for error catchers. - The `cookie` `secure` feature is now properly conditionally enabled. - Data before encapsulation boundaries in TLS keys is allowed and ignored. - Support for TLS keys in SEC1 format was added. - Rocket now warns when a known secret key is configured. - A panic that could occur on shutdown in `rocket_sync_db_pools` was fixed. - Added a [`max_blocking`][max_blocking] configuration parameter to control number of blocking threads. - Added an [`ip_header`][ip_header] "real IP" header configuration parameter. - A [`pool()`][pool()] method is emitted by [`rocket_sync_db_pools`][rocket_sync_db_pools] for code-generated pools. - Data guards are now eligible [sentinels]. - Raw binary form field data can be retrieved using the `&[u8]` form guard. - Added [`TempFile::open()`][TempFile::open()] to stream `TempFile` data. - mTLS certificates can be set on local requests with [`LocalRequest::identity()`][LocalRequest::identity()]. - Added [`Error::pretty_print()`][Error::pretty_print()] for pretty-printing errors like Rocket. - Warnings are logged when data limits are reached. - A warning is emitted when `String` is used as a route parameter. - Configuration provenance information is logged under the `debug` log level. - Logging of `Outcome`s now includes the relevant status code. - `Span::mixed_site()` is used in codegen to reduce errant `clippy` warnings. ##### HTTP - Added support for HTTP/2, enabled by default via the `http2` crate feature. - Added a `const` constructor for `MediaType`. - Introduced [`RawStrBuf`][RawStrBuf], an owned `RawStr`. - Added many new "pattern" methods to [`RawStr`][RawStr]. - Added [`RawStr::percent_encode()`][RawStr::percent_encode()] and [`RawStr::strip()`][RawStr::strip()]. - Added support for unencoded query characters in URIs that are frequently sent by browsers. - Introduced [`Host`][Host] and [`&Host`][&Host] request guards. - Added [`RawStr::percent_encode_bytes()`][RawStr::percent_encode_bytes()]. - `NODELAY` is now enabled on all connections by default. - The TLS implementation handles handshakes off the main task, improving DoS resistance. ##### Known Media Types - Added AVIF: `image/avif`. - Added `EventStream`: `text/event-stream`. - Added `Markdown`: `text/markdown`. - Added `MP3`: `audio/mpeg`. - Added `CBZ`: `application/vnd.comicbook+zip`, extension `.cbz`. - Added `CBR`: `application/vnd.comicbook-rar`, extension `.cbr`. - Added `RAR`: `application/vnd.rar`, extension `.rar`. - Added `EPUB`: `application/epub+zip`, extension `.epub`. - Added `OPF`: `application/oebps-package+xml`, extension `.opf`. - Added `XHTML`: `application/xhtml+xml`, extension `.xhtml`. - Added `Text` as an alias for the `Plain` media type. - Added `Bytes` as an alias for the `Binary` media type. - Added `.mjs` as known JavaScript extension. - Added '.exe', '.iso', '.dmg' as known extensions. ##### Request - Added support for all UTF-8 characters in route paths. - Added support for percent-encoded `:` in socket or IP address values in \[`FromFormValue`]. - Added [`Request::rocket()`][Request::rocket()] to access the active `Rocket` instance. - `Request::uri()` now returns an `&Origin<'r>` instead of `&Origin<'_>`. - `Request::accept()`, `Request::content_type()` reflect changes to `Accept`, `Content-Type`. - `Json`, `MsgPack` accept `T: Deserialize`, not only `T: DeserializeOwned`.
- Diesel SQLite connections in `rocket_sync_db_pools` use better defaults.
- The default number of workers for synchronous database pools is now `workers * 4`.
- Added [`Request::host()`][Request::host()] to retrieve the client-requested host.
##### Response
- Added [`Template::try_custom()`][Template::try_custom()] for fallible template engine customization.
- Manually registered templates can now be rendered with `Template::render()`.
- Added support for the `X-DNS-Prefetch-Control` header to `Shield`.
- Added support for manually-set `expires` values for private cookies.
- Added support for type generics and custom generic bounds to
[`#[derive(Responder)]`](https://api.rocket.rs/v0.5/rocket/derive.Responder.html).
- The `Server` header is only set if one isn't already set.
- Accurate `Content-Length` headers are sent even for partially read `Body`s.
- [`Redirect`][Redirect] now accepts a `TryFrom`, allowing fragment parts.
##### Trait Implementations
- Implemented `Clone` for `State`.
- Implemented `Copy` and `Clone` for `fairing::Info`.
- Implemented `Debug` for `Rocket` and `Client`.
- Implemented `Default` for `Status` (returns `Status::Ok`).
- Implemented `PartialEq`, `Eq`, `Hash`, `PartialOrd`, and `Ord` for `Status`.
- Implemented `Eq`, `Hash`, and `PartialEq<&str>` for `Origin`.
- Implemented `PartialEq>>` for `RawStr`.
- Implemented `std::error::Error` for `Error`.
- Implemented `Deref` and `DerefMut` for `LocalRequest` (to `Request`).
- Implemented `DerefMut` for `Form`, `LenientForm`.
- Implemented `From` for `Json`, `MsgPack`.
- Implemented `TryFrom` and `TryFrom<&str>` for `Origin`.
- Implemented `TryFrom` for each of the specific URI variants.
- Implemented `FromRequest` for `&Config`.
- Implemented `FromRequest` for `IpAddr`.
- Implemented `FromParam` for `PathBuf`
- Implemented `FromParam`, `FromData`, and `FromForm` for `&str`.
- Implemented `FromForm` for `Json`, `MsgPack`.
- Implemented `FromFormField` for `Cow` and `Capped>`
- Implemented `Responder` for `tokio::fs::File`.
- Implemented `Responder` for `(ContentType, R) where R: Responder`.
- Implemented `Responder` for `(Status, R) where R: Responder` which overrides `R`'s status.
- Implemented `Responder` for `std::io::Error` (behaves as `Debug`).
- Implemented `Responder` for `Either`, equivalently to `Result`.
- Implemented `Serialize` for `Flash`.
- Implemented `Serialize`, `Deserialize`, `UriDisplay` and `FromUriParam` for `uuid::Uuid`
- Implemented `Serialize`, `Deserialize` for `RawStr`.
- Implemented `Serialize`, `Deserialize` for all URI types.
- Implemented `Responder` for `Arc`, `Box` where `T: Responder`.
- Implemented `Serialize` and `Deserialize` for [`Method`][Method].
- Implemented `Eq` for [`MediaType`][MediaType] and [`ContentType`][ContentType].
- Implemented `Responder` for `Box`.
- Implemented `FromForm` for `Arc`.
- Implemented `Fairing` for `Arc`.
- Implemented `Serialize` and `Deserialize` for `Status`.
##### Dependency Changes
- `serde` was introduced (`1.0`).
- `futures` was introduced (`0.3`).
- `binascii` was introduced (`0.1`).
- `ref-cast` was introduced (`1.0`).
- `atomic` was introduced (`0.5`).
- `parking_lot` was introduced (`0.11`).
- `ubtye` was introduced (`0.10`).
- `figment` was introduced (`0.10`).
- `rand` was introduced (`0.8`).
- `either` was introduced (`1.0`).
- `pin-project-lite` was introduced (`0.2`).
- `indexmap` was introduced (`2.0`).
- `tempfile` was introduced (`3.0`).
- `async-trait` was introduced (`0.1`).
- `async-stream` was introduced (`0.3`).
- `multer` was introduced (`2.0`).
- `tokio` was introduced (`1.6.1`).
- `tokio-util` was introduced (`0.6`).
- `tokio-stream` was introduced (`0.1.6`).
- `bytes` was introduced (`1.0`).
- `normpath` was introduced (`1`).
- `state` was updated to `0.6`.
- `rmp-serde` was updated to `0.15`.
- `uuid` was updated to `0.8`.
- `tera` was updated to `1.10`.
- `postgres` was updated to `0.19`.
- `rusqlite` was updated to `0.25`.
- `r2d2_sqlite` was updated to `0.18`.
- `time` was updated to `0.3`.
- `handlebars` was updated to `4.0`.
- `memcache` was updated to `0.16`.
- `rustls` was updated to `0.21`.
- `tokio-rustls` was updated to `0.24`.
- `syn` was updated to `2`.
- `diesel` was updated to `2.0`.
- `sqlx` was updated to `0.7`.
- `notify` was updated to `6`.
- `criterion` was updated to `0.4`.
- `cookie` was updated to `0.18`.
- `yansi` was updated to `1.0`.
- `atty` was removed.
#### Infrastructure
The following changes were made to the project's infrastructure:
- Rocket now uses the 2021 edition of Rust.
- Added a [v0.4 to v0.5 migration guide] and [FAQ] to Rocket's website.
- Added visible `use` statements to examples in the guide.
- Split examples into a separate workspace for easier testing.
- Updated documentation for all changes.
- Fixed many typos, errors, and broken links throughout documentation and examples.
- Improved the general robustness of macros, and the quality and frequency of error messages.
- Benchmarks now use `criterion` and datasets extracted from real-world projects.
- Fixed the SPDX license expressions in `Cargo.toml` files.
- Added support to `test.sh` for a `+` flag (e.g. `+stable`) to pass to `cargo`.
- Added support to `test.sh` for extra flags to be passed on to `cargo`.
- UI tests are now allowed to fail by the CI to avoid false negatives.
- The GitHub CI workflow was updated to use maintained actions.
- The CI now frees disk space before proceeding to avoid out-of-disk errors.
- All workspaces now use `resolver = 2`.
[phase]: https://api.rocket.rs/v0.5/rocket/struct.Rocket.html#phases
[`async`/`await`]: https://rocket.rs/v0.5/guide/overview/#async-routes
[compilation on Rust's stable]: https://rocket.rs/v0.5/guide/getting-started/#installing-rust
[Feature-complete forms support]: https://rocket.rs/v0.5/guide/requests/#forms
[configuration system]: https://rocket.rs/v0.5/guide/configuration/#configuration
[graceful shutdown]: https://api.rocket.rs/v0.5/rocket/config/struct.Shutdown.html#summary
[asynchronous testing]: https://rocket.rs/v0.5/guide/testing/#asynchronous-testing
[UTF-8 characters]: https://rocket.rs/v0.5/guide/requests/#static-parameters
[ignorable segments]: https://rocket.rs/v0.5/guide/requests/#ignored-segments
[Catcher scoping]: https://rocket.rs/v0.5/guide/requests/#scoping
[ad-hoc validation]: https://rocket.rs/v0.5/guide/requests#ad-hoc-validation
[incoming data limits]: https://rocket.rs/v0.5/guide/requests/#streaming
[build phases]: https://api.rocket.rs/v0.5/rocket/struct.Rocket.html#phases
[Singleton fairings]: https://api.rocket.rs/v0.5/rocket/fairing/trait.Fairing.html#singletons
[features into core]: https://api.rocket.rs/v0.5/rocket/index.html#features
[features of `rocket`]: https://api.rocket.rs/v0.5/rocket/index.html#features
[Data limit declaration in SI units]: https://api.rocket.rs/v0.5/rocket/data/struct.ByteUnit.html
[support for `serde`]: https://api.rocket.rs/v0.5/rocket/serde/index.html
[automatic typed config extraction]: https://api.rocket.rs/v0.5/rocket/fairing/struct.AdHoc.html#method.config
[misconfigured secrets]: https://api.rocket.rs/v0.5/rocket/config/struct.SecretKey.html
[default ranking colors]: https://rocket.rs/v0.5/guide/requests/#default-ranking
[`chat`]: https://togithub.com/rwf2/Rocket/tree/v0.5/examples/chat
[`Form` guard]: https://api.rocket.rs/v0.5/rocket/form/struct.Form.html
[`Strict`]: https://api.rocket.rs/v0.5/rocket/form/struct.Strict.html
[`CookieJar`#pending]: https://api.rocket.rs/v0.5/rocket/http/struct.CookieJar.html#pending
[`rocket::serde::json`]: https://api.rocket.rs/v0.5/rocket/serde/json/index.html
[`rocket::serde::msgpack`]: https://api.rocket.rs/v0.5/rocket/serde/msgpack/index.html
[`rocket::serde::uuid`]: https://api.rocket.rs/v0.5/rocket/serde/uuid/index.html
[`rocket::shield`]: https://api.rocket.rs/v0.5/rocket/shield/index.html
[`rocket::fs`]: https://api.rocket.rs/v0.5/rocket/fs/index.html
[`async run()`]: https://api.rocket.rs/v0.5/rocket_sync_db_pools/index.html#handlers
[`LocalRequest::json()`]: https://api.rocket.rs/v0.5/rocket/local/blocking/struct.LocalRequest.html#method.json
[`LocalRequest::msgpack()`]: https://api.rocket.rs/v0.5/rocket/local/blocking/struct.LocalRequest.html#method.msgpack
[`LocalResponse::json()`]: https://api.rocket.rs/v0.5/rocket/local/blocking/struct.LocalResponse.html#method.json
[`LocalResponse::msgpack()`]: https://api.rocket.rs/v0.5/rocket/local/blocking/struct.LocalResponse.html#method.msgpack
[hierarchical data limits]: https://api.rocket.rs/v0.5/rocket/data/struct.Limits.html#hierarchy
[default form field values]: https://rocket.rs/v0.5/guide/requests/#defaults
[`Config::ident`]: https://api.rocket.rs/rocket/struct.Config.html#structfield.ident
[`tokio`]: https://tokio.rs/
[Figment]: https://docs.rs/figment/0.10/figment/
[`TempFile`]: https://api.rocket.rs/v0.5/rocket/fs/enum.TempFile.html
[`Contextual`]: https://rocket.rs/v0.5/guide/requests/#context
[`Capped`]: https://api.rocket.rs/v0.5/rocket/data/struct.Capped.html
[default catchers]: https://rocket.rs/v0.5/guide/requests/#default-catchers
[URI types]: https://api.rocket.rs/v0.5/rocket/http/uri/index.html
[`uri!`]: https://api.rocket.rs/v0.5/rocket/macro.uri.html
[`Reference`]: https://api.rocket.rs/v0.5/rocket/http/uri/struct.Reference.html
[`Asterisk`]: https://api.rocket.rs/v0.5/rocket/http/uri/struct.Asterisk.html
[`Redirect`]: https://api.rocket.rs/v0.5/rocket/response/struct.Redirect.html
[`UriDisplayQuery`]: https://api.rocket.rs/v0.5/rocket/derive.UriDisplayQuery.html
[`Shield`]: https://api.rocket.rs/v0.5/rocket/shield/struct.Shield.html
[Sentinels]: https://api.rocket.rs/v0.5/rocket/trait.Sentinel.html
[`local_cache!`]: https://api.rocket.rs/v0.5/rocket/request/macro.local_cache.html
[`local_cache_once!`]: https://api.rocket.rs/v0.5/rocket/request/macro.local_cache_once.html
[`CookieJar`]: https://api.rocket.rs/v0.5/rocket/http/struct.CookieJar.html
[asynchronous streams]: https://rocket.rs/v0.5/guide/responses/#async-streams
[Server-Sent Events]: https://api.rocket.rs/v0.5/rocket/response/stream/struct.EventStream.html
[`fs::relative!`]: https://api.rocket.rs/v0.5/rocket/fs/macro.relative.html
[notification]: https://api.rocket.rs/v0.5/rocket/struct.Shutdown.html
[`Rocket`]: https://api.rocket.rs/v0.5/rocket/struct.Rocket.html
[`rocket::build()`]: https://api.rocket.rs/v0.5/rocket/struct.Rocket.html#method.build
[`Rocket::ignite()`]: https://api.rocket.rs/v0.5/rocket/struct.Rocket.html#method.ignite
[`Rocket::launch()`]: https://api.rocket.rs/v0.5/rocket/struct.Rocket.html#method.launch
[`Request::rocket()`]: https://api.rocket.rs/v0.5/rocket/request/struct.Request.html#method.rocket
[Fairings]: https://rocket.rs/v0.5/guide/fairings/
[configuration system]: https://rocket.rs/v0.5/guide/configuration/
[`Poolable`]: https://api.rocket.rs/v0.5/rocket_sync_db_pools/trait.Poolable.html
[`Config`]: https://api.rocket.rs/v0.5/rocket/struct.Config.html
[`Error`]: https://api.rocket.rs/v0.5/rocket/struct.Error.html
[`LogLevel`]: https://api.rocket.rs/v0.5/rocket/config/enum.LogLevel.html
[`Rocket::register()`]: https://api.rocket.rs/v0.5/rocket/struct.Rocket.html#method.register
[`NamedFile::open`]: https://api.rocket.rs/v0.5/rocket/fs/struct.NamedFile.html#method.open
[`Request::local_cache_async()`]: https://api.rocket.rs/v0.5/rocket/request/struct.Request.html#method.local_cache_async
[`FromRequest`]: https://api.rocket.rs/v0.5/rocket/request/trait.FromRequest.html
[`Fairing`]: https://api.rocket.rs/v0.5/rocket/fairing/trait.Fairing.html
[`catcher::Handler`]: https://api.rocket.rs/v0.5/rocket/catcher/trait.Handler.html
[`route::Handler`]: https://api.rocket.rs/v0.5/rocket/route/trait.Handler.html
[`FromData`]: https://api.rocket.rs/v0.5/rocket/data/trait.FromData.html
[`AsyncRead`]: https://docs.rs/tokio/1/tokio/io/trait.AsyncRead.html
[`AsyncSeek`]: https://docs.rs/tokio/1/tokio/io/trait.AsyncSeek.html
[`rocket::local::asynchronous`]: https://api.rocket.rs/v0.5/rocket/local/asynchronous/index.html
[`rocket::local::blocking`]: https://api.rocket.rs/v0.5/rocket/local/blocking/index.html
[`Outcome`]: https://api.rocket.rs/v0.5/rocket/outcome/enum.Outcome.html
[`rocket::outcome::try_outcome!`]: https://api.rocket.rs/v0.5/rocket/outcome/macro.try_outcome.html
[`Result` implements `Responder`]: https://api.rocket.rs/v0.5/rocket/response/trait.Responder.html#provided-implementations
[`Debug`]: https://api.rocket.rs/v0.5/rocket/response/struct.Debug.html
[`std::convert::Infallible`]: https://doc.rust-lang.org/stable/std/convert/enum.Infallible.html
[`ErrorKind::Collisions`]: https://api.rocket.rs/v0.5/rocket/error/enum.ErrorKind.html#variant.Collisions
[`rocket::http::uri::fmt`]: https://api.rocket.rs/v0.5/rocket/http/uri/fmt/index.html
[`Data::open()`]: https://api.rocket.rs/v0.5/rocket/data/struct.Data.html#method.open
[`DataStream`]: https://api.rocket.rs/v0.5/rocket/data/struct.DataStream.html
[`rocket::form`]: https://api.rocket.rs/v0.5/rocket/form/index.html
[`FromFormField`]: https://api.rocket.rs/v0.5/rocket/form/trait.FromFormField.html
[`FromForm`]: https://api.rocket.rs/v0.5/rocket/form/trait.FromForm.html
[`FlashMessage`]: https://api.rocket.rs/v0.5/rocket/request/type.FlashMessage.html
[`Flash`]: https://api.rocket.rs/v0.5/rocket/response/struct.Flash.html
[`rocket::State`]: https://api.rocket.rs/v0.5/rocket/struct.State.html
[`Segments` and `Segments`]: https://api.rocket.rs/v0.5/rocket/http/uri/struct.Segments.html
[`Route::map_base()`]: https://api.rocket.rs/v0.5/rocket/route/struct.Route.html#method.map_base
[`uuid` support]: https://api.rocket.rs/v0.5/rocket/serde/uuid/index.html
[`json`]: https://api.rocket.rs/v0.5/rocket/serde/json/index.html
[`msgpack`]: https://api.rocket.rs/v0.5/rocket/serde/msgpack/index.html
[`rocket::serde::json::json!`]: https://api.rocket.rs/v0.5/rocket/serde/json/macro.json.html
[`rocket::shield::Shield`]: https://api.rocket.rs/v0.5/rocket/shield/struct.Shield.html
[`rocket::fs::FileServer`]: https://api.rocket.rs/v0.5/rocket/fs/struct.FileServer.html
[`rocket_dyn_templates`]: https://api.rocket.rs/v0.5/rocket_dyn_templates/index.html
[`rocket_sync_db_pools`]: https://api.rocket.rs/v0.5/rocket_sync_db_pools/index.html
[multitasking]: https://rocket.rs/v0.5/guide/overview/#multitasking
[`Created`]: https://api.rocket.rs/v0.5/rocket/response/status/struct.Created.html
[`Created::tagged_body`]: https://api.rocket.rs/v0.5/rocket/response/status/struct.Created.html#method.tagged_body
[raw identifiers]: https://doc.rust-lang.org/1.51.0/book/appendix-01-keywords.html#raw-identifiers
[`Rocket::config()`]: https://api.rocket.rs/v0.5/rocket/struct.Rocket.html#method.config
[`Rocket::figment()`]: https://api.rocket.rs/v0.5/rocket/struct.Rocket.html#method.figment
[`Rocket::state()`]: https://api.rocket.rs/v0.5/rocket/struct.Rocket.html#method.state
[`Rocket::catchers()`]: https://api.rocket.rs/v0.5/rocket/struct.Rocket.html#method.catchers
[`LocalRequest::inner_mut()`]: https://api.rocket.rs/v0.5/rocket/local/blocking/struct.LocalRequest.html#method.inner_mut
[`RawStrBuf`]: https://api.rocket.rs/v0.5/rocket/http/struct.RawStrBuf.html
[`RawStr`]: https://api.rocket.rs/v0.5/rocket/http/struct.RawStr.html
[`RawStr::percent_encode()`]: https://api.rocket.rs/v0.5/rocket/http/struct.RawStr.html#method.percent_encode
[`RawStr::percent_encode_bytes()`]: https://api.rocket.rs/v0.5/rocket/http/struct.RawStr.html#method.percent_encode_bytes
[`RawStr::strip()`]: https://api.rocket.rs/v0.5/rocket/http/struct.RawStr.html#method.strip_prefix
[`rocket::catcher`]: https://api.rocket.rs/v0.5/rocket/catcher/index.html
[`rocket::route`]: https://api.rocket.rs/v0.5/rocket/route/index.html
[`Segments::prefix_of()`]: https://api.rocket.rs/v0.5/rocket/http/uri/struct.Segments.html#method.prefix_of
[`Template::try_custom()`]: https://api.rocket.rs/v0.5/rocket_dyn_templates/struct.Template.html#method.try_custom
[`Template::custom`]: https://api.rocket.rs/v0.5/rocket_dyn_templates/struct.Template.html#method.custom
[`FileServer::new()`]: https://api.rocket.rs/v0.5/rocket/fs/struct.FileServer.html#method.new
[`content`]: https://api.rocket.rs/v0.5/rocket/response/content/index.html
[`rocket_db_pools`]: https://api.rocket.rs/v0.5/rocket_db_pools/index.html
[mutual TLS]: https://rocket.rs/v0.5/guide/configuration/#mutual-tls
[`Certificate`]: https://api.rocket.rs/v0.5/rocket/mtls/struct.Certificate.html
[`MediaType::with_params()`]: https://api.rocket.rs/v0.5/rocket/http/struct.MediaType.html#method.with_params
[`ContentType::with_params()`]: https://api.rocket.rs/v0.5/rocket/http/struct.ContentType.html#method.with_params
[`Host`]: https://api.rocket.rs/v0.5/rocket/http/uri/struct.Host.html
[`&Host`]: https://api.rocket.rs/v0.5/rocket/http/uri/struct.Host.html
[`Request::host()`]: https://api.rocket.rs/v0.5/rocket/request/struct.Request.html#method.host
[`context!`]: https://api.rocket.rs/v0.5/rocket_dyn_templates/macro.context.html
[`MediaType`]: https://api.rocket.rs/v0.5/rocket/http/struct.MediaType.html
[`ContentType`]: https://api.rocket.rs/v0.5/rocket/http/struct.ContentType.html
[`Method`]: https://api.rocket.rs/v0.5/rocket/http/enum.Method.html
[`(ContentType, T)`]: https://api.rocket.rs/v0.5/rocket/response/content/index.html#usage
[v0.4 to v0.5 migration guide]: https://rocket.rs/v0.5/guide/upgrading/
[contrib deprecation upgrade guide]: https://rocket.rs/v0.5/guide/upgrading/#contrib-deprecation
[FAQ]: https://rocket.rs/v0.5/guide/faq/
[`Rocket::launch()`]: https://api.rocket.rs/v0.5/rocket/struct.Rocket.html#method.launch
[`ErrorKind::Shutdown`]: https://api.rocket.rs/v0.5/rocket/error/enum.ErrorKind.html#variant.Shutdown
[shutdown fairings]: https://api.rocket.rs/v0.5/rocket/fairing/trait.Fairing.html#shutdown
[`Client::terminate()`]: https://api.rocket.rs/v0.5/rocket/local/blocking/struct.Client.html#method.terminate
[`rocket::execute()`]: https://api.rocket.rs/v0.5/rocket/fn.execute.html
[`CookieJar::get_pending()`]: https://api.rocket.rs/v0.5/rocket/http/struct.CookieJar.html#method.get_pending
[`Metadata::render()`]: https://api.rocket.rs/v0.5/rocket_dyn_templates/struct.Metadata.html#method.render
[`pool()`]: https://api.rocket.rs/v0.5/rocket_sync_db_pools/example/struct.ExampleDb.html#method.pool
[`Request::client_ip()`]: https://api.rocket.rs/v0.5/rocket/request/struct.Request.html#method.client_ip
[`max_blocking`]: https://api.rocket.rs/v0.5/rocket/struct.Config.html#structfield.max_blocking
[`ip_header`]: https://api.rocket.rs/v0.5/rocket/struct.Config.html#structfield.ip_header
[`LocalRequest::identity()`]: https://api.rocket.rs/v0.5/rocket/local/blocking/struct.LocalRequest.html#method.identity
[`TempFile::open()`]: https://api.rocket.rs/v0.5/rocket/fs/enum.TempFile.html#method.open
[`Error::pretty_print()`]: https://api.rocket.rs/v0.5/rocket/struct.Error.html#method.pretty_print
[Request connection upgrade APIs]: https://api.rocket.rs/v0.5/rocket/struct.Response.html#upgrading
[`rocket_ws`]: https://api.rocket.rs/v0.5/rocket_ws/
[registering]: https://api.rocket.rs/v0.5/rocket/response/struct.Response.html#method.add_upgrade
[`IoHandler`]: https://api.rocket.rs/v0.5/rocket/data/trait.IoHandler.html
[`response::status`]: https://api.rocket.rs/v0.5/rocket/response/status/index.html
[Custom form errors]: https://api.rocket.rs/v0.5/rocket/form/error/enum.ErrorKind.html#variant.Custom
[`request::Outcome`]: https://api.rocket.rs/v0.5/rocket/request/type.Outcome.html#variant.Forward
[Route `Forward` outcomes]: https://api.rocket.rs/v0.5/rocket/request/type.Outcome.html#variant.Forward
[`Outcome::Error`]: https://api.rocket.rs/v0.5/rocket/outcome/enum.Outcome.html#variant.Error
[`IntoOutcome`]: https://api.rocket.rs/v0.5/rocket/outcome/trait.IntoOutcome.html
[`MediaType::JavaScript`]: https://api.rocket.rs/v0.5/rocket/http/struct.MediaType.html#associatedconstant.JavaScript
[`TempFile::open()`]: https://api.rocket.rs/v0.5/rocket/fs/enum.TempFile.html#method.open
[`Error::pretty_print()`]: https://api.rocket.rs/v0.5/rocket/struct.Error.html#method.pretty_print
[`RouteUri`]: https://api.rocket.rs/v0.5/rocket/route/struct.RouteUri.html
### [`v0.5.0-rc.4`](https://togithub.com/rwf2/Rocket/releases/tag/v0.5.0-rc.4): Rocket v0.5.0-rc.4
[Compare Source](https://togithub.com/SergioBenitez/Rocket/compare/v0.5.0-rc.3...v0.5.0-rc.4)
See the [CHANGELOG](https://togithub.com/SergioBenitez/Rocket/blob/v0.5.0-rc.4/CHANGELOG.md), [news article](https://rocket.rs/v0.5-rc/news/2023-11-01-version-0.5-rc.4/), [migration guide](https://rocket.rs/v0.5-rc/guide/upgrading/), and [FAQ](https://rocket.rs/v0.5-rc/guide/faq/) for more information.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
â™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.