|
1 | | -# Version 0.5.0-rc.2 (May 9, 2022) |
| 1 | +# Version 0.5.0-rc.3 (Mar 23, 2023) |
| 2 | + |
| 3 | +## Major Features and Improvements |
| 4 | + |
| 5 | + * Added a [`max_blocking`] configuration parameter. |
| 6 | + |
| 7 | + The parameter sets a limit on the number of threads used by blocking tasks. |
| 8 | + |
| 9 | + * Added an [`ip_header`] "real IP" header configuration parameter. |
| 10 | + |
| 11 | + The parameter allows modifying the header that Rocket attempts to use to retrieve the "real IP" |
| 12 | + address of the client via `Request` methods like [`Request::client_ip()`]. Additionally, the |
| 13 | + change allows disabling the use of any such header entirely. |
| 14 | + |
| 15 | + * A [`pool()`] method is emitted by [`rocket_sync_db_pools`] for code-generated pools. |
| 16 | + |
| 17 | + The method returns an opaque reference to a type that can be used to retrieve pooled connections |
| 18 | + outside of a request handling context. |
| 19 | + |
| 20 | + * Raw binary form field data can be retrieved using the `&[u8]` form guard. |
| 21 | + |
| 22 | + * Data guards are now eligible [sentinels]. |
| 23 | + |
| 24 | +## General Improvements |
| 25 | + |
| 26 | + * Final launch messages are now _always_ logged, irrespective of profile. |
| 27 | + * Only functions that return `Rocket<Build>` are now `#[must_use]`, not all `Rocket<P>`. |
| 28 | + * Fixed mismatched form field names in errors under certain conditions in [`FromForm`] derive. |
| 29 | + * The [`FromForm`] derive now collects _all_ errors that occur. |
| 30 | + * Data pools are now gracefully shutdown in [`rocket_sync_db_pools`]. |
| 31 | + * Added [`Metadata::render()`] in [`rocket_dyn_templates`] for direct template rendering. |
| 32 | + * Rocket salvages more information from malformed requests for error catchers. |
| 33 | + * The `cookie` `secure` feature is now properly conditionally enabled. |
| 34 | + * Data before encapsulation boundaries in TLS keys is allowed and ignored. |
| 35 | + * Support for TLS keys in SEC1 format was added. |
| 36 | + * Rocket now warns when a known secret key is configured. |
| 37 | + * A panic that could occur on shutdown in `rocket_sync_db_pools` was fixed. |
| 38 | + |
| 39 | +### Known Media Types |
| 40 | + |
| 41 | + - Added `MP3`: `audio/mpeg`. |
| 42 | + - Added `CBZ`: `application/vnd.comicbook+zip`, extension `.cbz`. |
| 43 | + - Added `CBR`: `application/vnd.comicbook-rar`, extension `.cbr`. |
| 44 | + - Added `RAR`: `application/vnd.rar`, extension `.rar`. |
| 45 | + - Added `EPUB`: `application/epub+zip`, extension `.epub`. |
| 46 | + - Added `OPF`: `application/oebps-package+xml`, extension `.opf`. |
| 47 | + - Added `XHTML`: `application/xhtml+xml`, extension `.xhtml`. |
| 48 | + |
| 49 | +### Trait Implementations |
| 50 | + |
| 51 | + * Implemented `Responder` for `Box<T: Responder + Sized>`. |
| 52 | + * Implemented `FromForm` for `Arc<T>`. |
| 53 | + * Implemented `Fairing` for `Arc<dyn Fairing>`. |
| 54 | + |
| 55 | +### Updated Dependencies |
| 56 | + |
| 57 | + * Updated `syn` to `2`. |
| 58 | + * Updated `diesel` to `2.0`. |
| 59 | + * Updated `sqlx` to `0.6`. |
| 60 | + * Updated `notify` to `5.0`. |
| 61 | + * Updated `criterion` to `0.4`. |
| 62 | + * Updated `deadpool-redis` to `0.11`. |
| 63 | + * Updated `normpath` from to `1`. |
| 64 | + * Updated `cookie` to `0.17`. |
| 65 | + * Replaced `atty` with `is-terminal`. |
| 66 | + |
| 67 | +## Infrastructure |
| 68 | + |
| 69 | + * UI tests are now allowed to fail by the CI to avoid false negatives. |
| 70 | + * Fixed many typos, errors, and broken links throughout docs and examples. |
| 71 | + * The GitHub CI workflow was updated to use maintained actions. |
| 72 | + |
| 73 | +[`Metadata::render()`]: https://api.rocket.rs/v0.5-rc/rocket_dyn_templates/struct.Metadata.html#method.render |
| 74 | +[`pool()`]: https://api.rocket.rs/v0.5-rc/rocket_sync_db_pools/example/struct.ExampleDb.html#method.pool |
| 75 | +[`Request::client_ip()`]: https://api.rocket.rs/v0.5-rc/rocket/request/struct.Request.html#method.client_ip |
| 76 | +[`max_blocking`]: https://api.rocket.rs/v0.5-rc/rocket/struct.Config.html#structfield.max_blocking |
| 77 | +[`ip_header`]: https://api.rocket.rs/v0.5-rc/rocket/struct.Config.html#structfield.ip_header |
| 78 | + |
| 79 | +# Version 0.5.0-rc.2 (May 09, 2022) |
2 | 80 |
|
3 | 81 | ## Major Features and Improvements |
4 | 82 |
|
5 | 83 | * Introduced [`rocket_db_pools`] for asynchronous database pooling. |
6 | 84 | * Introduced support for [mutual TLS] and client [`Certificate`]s. |
7 | 85 | * Added a [`local_cache_once!`] macro for request-local storage. |
8 | | - * Added a [v0.4 to v0.5 migration guide] and [FAQ] the Rocket's website. |
| 86 | + * Added a [v0.4 to v0.5 migration guide] and [FAQ] to Rocket's website. |
9 | 87 | * Introduced [shutdown fairings]. |
10 | 88 |
|
11 | 89 | ## Breaking Changes |
|
15 | 93 | * [`MediaType::with_params()`] and [`ContentType::with_params()`] are now builder methods. |
16 | 94 | * Content-Type [`content`] responder type names are now prefixed with `Raw`. |
17 | 95 | * The `content::Plain` responder is now called `content::RawText`. |
| 96 | + * The `content::Custom<T>` responder was removed in favor of [`(ContentType, T)`]. |
18 | 97 | * TLS config structs are now only available when the `tls` feature is enabled. |
19 | 98 | * Removed `CookieJar::get_private_pending()` in favor of [`CookieJar::get_pending()`]. |
20 | 99 | * The [`local_cache!`] macro accepts fewer types. Use [`local_cache_once!`] as appropriate. |
|
67 | 146 |
|
68 | 147 | * Rocket now uses the 2021 edition of Rust. |
69 | 148 |
|
70 | | -[v0.4 to v0.5 migration guide]: https://rocket.rs/v0.5-rc/guide/upgrading-from-0.4/ |
| 149 | +[`(ContentType, T)`]: https://api.rocket.rs/v0.5-rc/rocket/response/content/index.html#usage |
| 150 | +[v0.4 to v0.5 migration guide]: https://rocket.rs/v0.5-rc/guide/upgrading/ |
71 | 151 | [FAQ]: https://rocket.rs/v0.5-rc/guide/faq/ |
72 | 152 | [`Rocket::launch()`]: https://api.rocket.rs/v0.5-rc/rocket/struct.Rocket.html#method.launch |
73 | 153 | [`ErrorKind::Shutdown`]: https://api.rocket.rs/v0.5-rc/rocket/error/enum.ErrorKind.html#variant.Shutdown |
@@ -2166,7 +2246,7 @@ the Rocket APIs. They are summarized through the following API changes: |
2166 | 2246 | * Added `FromData` conversion trait and default implementation. |
2167 | 2247 | * `FromData` is used to automatically derive the `data` parameter. |
2168 | 2248 | * `Responder`s are now final: they cannot forward to other requests. |
2169 | | - * `Responser`s may only forward to catchers. |
| 2249 | + * `Responder`s may only forward to catchers. |
2170 | 2250 |
|
2171 | 2251 | ## Breaking |
2172 | 2252 |
|
|
0 commit comments