web-v4.4.0

actix/actix-webweb-v4.4.0Aug 29, 2023by robjtede

AI Summary

Version 4.4.0 of actix-web adds H2C auto-bind methods, Rustls 0.21 support, and convenience methods for route guards and payload handling.

Key Highlights

  • Added H2C auto-bind methods behind the `http2` feature.
  • Added Rustls 0.21 support behind the `rustls-0_21` feature.
  • Added `Resource::{get, post, etc...}` methods for concise route definitions.
  • Added `Payload::to_bytes[_limited]()` helper methods.

New Features

  • H2C auto-bind support
  • Rustls 0.21 support
  • Resource convenience methods
  • Payload helper methods

Full Release Notes

### Added

- Add `HttpServer::{bind, listen}_auto_h2c()` methods behind new `http2` crate feature.
- Add `HttpServer::{bind, listen}_rustls_021()` methods for Rustls v0.21 support behind new `rustls-0_21` crate feature.
- Add `Resource::{get, post, etc...}` methods for more concisely adding routes that don't need additional guards.
- Add `web::Payload::to_bytes[_limited]()` helper methods.
- Add missing constructors on `HttpResponse` for several status codes.
- Add `http::header::ContentLength` typed header.
- Implement `Default` for `web::Data`.
- Implement `serde::Deserialize` for `web::Data`.
- Add `rustls-0_20` crate feature, which the existing `rustls` feature now aliases.

### Changed

- Handler functions can now receive up to 16 extractor parameters.
- The `Compress` middleware no longer compresses image or video content.
- Hide sensitive header values in `HttpRequest`'s `Debug` output.
- Minimum supported Rust version (MSRV) is now 1.68 due to transitive `time` dependency.