axum-v0.8.5
tokio-rs/axumaxum-v0.8.5Sep 28, 2025by jplatte
AI Summary
This release adds new WebSocket and Server-Sent Events capabilities, introduces a middleware layer for body mapping, and improves error handling for redirects.
Key Highlights
- Implemented `OptionalFromRequest` for `Multipart`.
- Added `ResponseAxumBodyLayer` for mapping response bodies.
- SSE module no longer depends on the `tokio` feature.
- `Redirect` now returns HTTP 500 instead of panicking on invalid header values.
New Features
- Implemented `OptionalFromRequest` for `Multipart`.
- Added getter methods to `Location`.
- Added support for writing binary data into Server-Sent Events.
- Implemented `FusedStream` for `WebSocket`.
Full Release Notes
- **fixed:** Reject JSON request bodies with trailing characters after the JSON document ([#3453])
- **added:** Implement `OptionalFromRequest` for `Multipart` ([#3220])
- **added:** Getter methods `Location::{status_code, location}`
- **added:** Support for writing arbitrary binary data into server-sent events ([#3425])]
- **added:** `middleware::ResponseAxumBodyLayer` for mapping response body to `axum::body::Body` ([#3469])
- **added:** `impl FusedStream for WebSocket` ([#3443])
- **changed:** The `sse` module and `Sse` type no longer depend on the `tokio` feature ([#3154])
- **changed:** If the location given to one of `Redirect`s constructors is not a valid header value, instead of panicking on construction, the `IntoResponse` impl now returns an HTTP 500, just like `Json` does when serialization fails ([#3377])
- **changed:** Update minimum rust version to 1.78 ([#3412])
[#3154]: https://github.com/tokio-rs/axum/pull/3154
[#3220]: https://github.com/tokio-rs/axum/pull/3220
[#3377]: https://github.com/tokio-rs/axum/pull/3377
[#3412]: https://github.com/tokio-rs/axum/pull/3412
[#3425]: https://github.com/tokio-rs/axum/pull/3425
[#3443]: https://github.com/tokio-rs/axum/pull/3443
[#3453]: https://github.com/tokio-rs/axum/pull/3453
[#3469]: https://github.com/tokio-rs/axum/pull/3469