web-v4.3.0
actix/actix-webweb-v4.3.0Jan 21, 2023by robjtede
AI Summary
This release introduces convenience constructors for content disposition, a rudimentary redirection service, and fallible testing helpers. It also adds new middleware and guard functionalities.
Key Highlights
- Added `ContentDisposition::attachment()` constructor
- Added `ErrorHandlers::default_handler()` for easier group status handler registration
- Added `web::redirect()` for rudimentary redirection
- Added fallible test helpers: `try_call_service()`, `try_call_and_read_body_json()`, etc.
- Added `guard::Acceptable` for matching against `Accept` header MIME types
New Features
- ContentDisposition::attachment() constructor
- ErrorHandlers::default_handler() and default_handler_{server, client}()
- Logger::custom_response_replace()
- web::redirect() / web::Redirect
- guard::Acceptable
- Fallible versions of test helpers
Full Release Notes
### Added
- Add `ContentDisposition::attachment()` constructor. [#2867]
- Add `ErrorHandlers::default_handler()` (as well as `default_handler_{server, client}()`) to make registering handlers for groups of response statuses easier. [#2784]
- Add `Logger::custom_response_replace()`. [#2631]
- Add rudimentary redirection service at `web::redirect()` / `web::Redirect`. [#1961]
- Add `guard::Acceptable` for matching against `Accept` header MIME types. [#2265]
- Add fallible versions of `test` helpers: `try_call_service()`, `try_call_and_read_body_json()`, `try_read_body()`, and `try_read_body_json()`. [#2961]
### Fixed
- Add `Allow` header to `Resource`'s default responses when no routes are matched. [#2949]
[#1961]: https://github.com/actix/actix-web/pull/1961
[#2265]: https://github.com/actix/actix-web/pull/2265
[#2631]: https://github.com/actix/actix-web/pull/2631
[#2784]: https://github.com/actix/actix-web/pull/2784
[#2867]: https://github.com/actix/actix-web/pull/2867
[#2949]: https://github.com/actix/actix-web/pull/2949
[#2961]: https://github.com/actix/actix-web/pull/2961