12 KiB
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.5.6
Improve error messages with #[diagnostic::do_not_recommend].
0.5.5
Released without changes to fix docs.rs build.
0.5.4
- fixed: Removed unused
rustversiondependency (#3502)
0.5.3
- added:
DefaultBodyLimit::applyfor changing theDefaultBodyLimitinside extractors. (#3368) - changed: Update minimum rust version to 1.78 ([#3412])
0.5.2
- added: Implement
Stream::size_hintforBodyDataStream(#3195)
0.5.1
Yanked from crates.io due to unforeseen breaking change, see #3190 for details.
0.5.0
since rc.1
- change: The
Displayimpl of all rejections generated by thedefine_rejection!()will now include theDisplayoutput of the inner error too. This matches thebody_text()fn output now. (#3118)
full changelog
- breaking: Replace
#[async_trait]with return-positionimpl Traitin traits (#2308) - breaking:
Option<T>as an extractor now requiresTto implement the new traitOptionalFromRequest(if used as the last extractor) orOptionalFromRequestParts(other extractors) (#2475) - change: Update minimum rust version to 1.75 (#2943)
- change: The
Displayimpl of all rejections generated by thedefine_rejection!()will now include theDisplayoutput of the inner error too. This matches thebody_text()fn output now. (#3118)
rc.1
- breaking:
Option<T>as an extractor now requiresTto implement the new traitOptionalFromRequest(if used as the last extractor) orOptionalFromRequestParts(other extractors) (#2475)
alpha.1
- breaking: Replace
#[async_trait]with return-positionimpl Traitin traits (#2308) - change: Update minimum rust version to 1.75 (#2943)
0.4.5
- fixed: Compile errors from the internal
__log_rejectionmacro under certain Cargo feature combinations between axum crates (#2933)
0.4.4
- added: Derive
CloneandCopyforAppendHeaders(#2776) - added:
must_useattribute onAppendHeaders(#2846) - added:
must_useattribute onErrorResponse(#2846) - added:
must_useattribute onIntoResponse::into_response(#2846) - added:
must_useattribute onIntoResponsePartstrait methods (#2846) - added: Implement
CopyforDefaultBodyLimit(#2875) - added:
DefaultBodyLimit::maxandDefaultBodyLimit::disableare now allowed in const context (#2875)
0.4.3 (13. January, 2024)
- added: Implement
IntoResponsePartsfor()(#2471)
0.4.2 (29. December, 2023)
- added:
BodyimplementsFrom<()>now (#2411)
0.4.1 (03. December, 2023)
- Fix from_stream doc link to
Streamin docs (#2391)
0.4.0 (27. November, 2023)
- added: Implement
IntoResponsefor(R,) where R: IntoResponse(#2143) - fixed: Fix broken docs links (#2164)
- fixed: Clearly document applying
DefaultBodyLimitto individual routes (#2157) - breaking: The following types/traits are no longer generic over the request body
(i.e. the
Btype param has been removed) ([#1751] and [#1789]):FromRequestPartsFromRequestRequestExt
- breaking: axum no longer re-exports
hyper::Bodyas that type is removed in hyper 1.0. Instead axum has its own body type ataxum_core::body::Body([#1751])
0.3.4 (11. April, 2023)
- Changes to private APIs.
0.3.3 (03. March, 2023)
- fixed: Add
#[must_use]attributes to types that do nothing unless used (#1809)
0.3.2 (20. January, 2023)
- added: Implement
IntoResponsefor&'static [u8; N]and[u8; N](#1690)
0.3.1 (9. January, 2023)
- added: Add
body_textandstatusmethods to built-in rejections (#1612)
0.3.0 (25. November, 2022)
- added: Added new
FromRequestPartstrait. See axum's changelog for more details (#1272) - breaking:
FromRequesthas been reworked andRequestPartshas been removed. See axum's changelog for more details (#1272) - breaking:
BodyAlreadyExtractedhas been removed (#1272) - breaking:
AppendHeadersnow works on anyimpl IntoIterator(#1495)
0.3.0 Pre-Releases
0.3.0-rc.3 (8. November, 2022)
- added: Add
DefaultBodyLimit::maxfor changing the default body limit (#1397) - added: Add
Error::into_innerfor convertingErrortoBoxErrorwithout allocating (#1476) - breaking:
AppendHeadersnow works on anyimpl IntoIterator(#1495)
0.3.0-rc.2 (10. September, 2022)
-
breaking: Added default limit to how much data
Bytes::from_requestwill consume. Previously it would attempt to consume the entire request body without checking its length. This meant if a malicious peer sent an large (or infinite) request body your server might run out of memory and crash.The default limit is at 2 MB and can be disabled by adding the new
DefaultBodyLimit::disable()middleware. See its documentation for more details.This also applies to
Stringwhich usedBytes::from_requestinternally.(#1346)
0.3.0-rc.1 (23. August, 2022)
0.2.8 (10. September, 2022)
-
breaking: Added default limit to how much data
Bytes::from_requestwill consume. Previously it would attempt to consume the entire request body without checking its length. This meant if a malicious peer sent an large (or infinite) request body your server might run out of memory and crash.The default limit is at 2 MB and can be disabled by adding the new
DefaultBodyLimit::disable()middleware. See its documentation for more details.This also applies to
Stringwhich usedBytes::from_requestinternally.(#1346)
0.2.7 (10. July, 2022)
- fix: Fix typos in
RequestPartsdocs (#1147)
0.2.6 (18. June, 2022)
- change: axum-core's MSRV is now 1.56 (#1098)
0.2.5 (08. June, 2022)
- added: Automatically handle
http_body::LengthLimitErrorinFailedToBufferBodyand map such errors to413 Payload Too Large(#1048) - fixed: Use
impl IntoResponseless in docs (#1049)
0.2.4 (02. May, 2022)
- added: Implement
IntoResponseandIntoResponsePartsforhttp::Extensions(#975) - added: Implement
IntoResponsefor(http::response::Parts, impl IntoResponse)(#950) - added: Implement
IntoResponsefor(http::response::Response<()>, impl IntoResponse)(#950) - added: Implement
IntoResponse for (Parts | Request<()>, $(impl IntoResponseParts)+, impl IntoResponse)(#980)
0.2.3 (25. April, 2022)
- added: Add
response::ErrorResponseandresponse::ResultforIntoResponse-based error handling (#921)
0.2.2 (19. April, 2022)
- added: Add
AppendHeadersfor appending headers to a response rather than overriding them (#927)
0.2.1 (03. April, 2022)
- added: Add
RequestParts::extractwhich allows applying an extractor as a method call (#897)
0.2.0 (31. March, 2022)
-
added: Add
IntoResponsePartstrait which allows defining custom response types for adding headers or extensions to responses (#797) -
breaking: Using
HeaderMapas an extractor will no longer remove the headers and thus they'll still be accessible to other extractors, such asaxum::extract::Json. InsteadHeaderMapwill clone the headers. You should prefer to useTypedHeaderto extract only the headers you need (#698)This includes these breaking changes:
RequestParts::take_headershas been removed.RequestParts::headersreturns&HeaderMap.RequestParts::headers_mutreturns&mut HeaderMap.HeadersAlreadyExtractedhas been removed.- The
HeadersAlreadyExtractedvariant has been removed from these rejections:RequestAlreadyExtractedRequestPartsAlreadyExtracted
<HeaderMap as FromRequest<_>>::Rejectionhas been changed tostd::convert::Infallible.
-
breaking:
axum::http::Extensionsis no longer an extractor (ie it doesn't implementFromRequest). Theaxum::extract::Extensionextractor is not impacted by this and works the same. This change makes it harder to accidentally remove all extensions which would result in confusing errors elsewhere (#699) This includes these breaking changes:RequestParts::take_extensionshas been removed.RequestParts::extensionsreturns&Extensions.RequestParts::extensions_mutreturns&mut Extensions.RequestAlreadyExtractedhas been removed.<Request as FromRequest>::Rejectionis nowBodyAlreadyExtracted.<http::request::Parts as FromRequest>::Rejectionis nowInfallible.ExtensionsAlreadyExtractedhas been removed.
-
breaking:
RequestParts::body_mutnow returns&mut Option<B>so the body can be swapped (#869)
0.1.2 (22. February, 2022)
- added: Implement
IntoResponseforbytes::BytesMutandbytes::Chain<T, U>(#767)
0.1.1 (06. December, 2021)
- added:
axum_core::response::Responsenow exists as a shorthand for writingResponse<BoxBody>(#590)
0.1.0 (02. December, 2021)
- Initial release.