NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io
crates.io, #1052 most downloaded on crates.io
HTTP types and services for the Actix ecosystem
Latest stable
3.21.0
Last release 13 days ago
09 Nov 2026
Release timing varies
gaps range from 8 days to 5 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
8 years old
113 releases · first in 2019
Drag across the ruler to compare, or tap a release to open it.
Add BodyStream::from_infallible() constructor.
TCP_NODELAY by default.BodyStream::from_infallible() constructor.SizedStream::from_infallible() constructor.Send GOAWAY to HTTP/2 connections during graceful server shutdown and close them once their in-flight streams finish.
Fix HTTP/1 client response framing for informational, 204, and 304 responses to prevent consumption of the next response.
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Disable large-window Brotli decompression. GHSA-7p9w-p5qm-5gc5
Reject bare LF as last chunk terminator in chunked encodings. GHSA-2q7f-mf9f-5qhr
Add encoding::Decoder::limit() to stop decompression with PayloadError::Overflow when decoded output exceeds the limit. GHSA-qph8-7859-gq2f
encoding::Decoder::limit() to stop decompression with PayloadError::Overflow when decoded output exceeds the limit. GHSA-qph8-7859-gq2fRelease oversized HTTP/1 write buffers after flushing to reduce memory retained by idle connections.
Fix QualityItem parsing to recognize quality parameters before other parameters and ignore semicolons inside quoted values.
QualityItem parsing to recognize quality parameters before other parameters and ignore semicolons inside quoted values.usize on 32-bit targets, using ws::ProtocolError::Overflow.zstd dependency to 0.14.brotli dependency to 9.Emit required Connection options for HTTP/1 response upgrade advertisements without changing connection state.
Connection options for HTTP/1 response upgrade advertisements without changing connection state.Connection header options consistently.Expect: 100-continue as a continue expectation in HTTP/1.1 requests.Sec-WebSocket-Key value that is not valid Base64 or does not decode to 16 bytes.Flush compressed response bodies when the source is pending.
Reject requests with a missing or duplicate Host header in HTTP/1.1 requests.
Host header in HTTP/1.1 requests.Allow trailer fields after chunked bodies.
Reject empty chunked size lines.
Ensure "chunked" declaration is final part of Transfer-Encoding header.
Fix Removed::len() panicking when inserting a new header or removing an absent header.
Removed::len() panicking when inserting a new header or removing an absent header.Removes h2 from the TLS ALPN offer list when http2 crate feature is disabled.
h2 from the TLS ALPN offer list when http2 crate feature is disabled.Deprecate the Parser::parse_close_payload() method in favor of Parser::try_parse_close_payload() .
Parser::parse_close_payload() method in favor of Parser::try_parse_close_payload().Reject WebSocket frames with reserved bits.
Close idle HTTP/1 keep-alive connections during graceful server shutdown and close active connections after their current request finishes.
Fix MessageBody implementation for ByteString to signal completion after yielding its contents. #4177
MessageBody implementation for ByteString to signal completion after yielding its contents. #4177Fix HTTP/1 WebSocket upgrade responses being overwritten with Connection: close when the upgraded request payload remains open. #4115
Connection: close when the upgraded request payload remains open. #4115When configured, gracefully close HTTP/1 connections after early responses to unread request bodies. #3967
Notice: This release contains a security fix. Users are encouraged to update to this version ASAP.
Notice: This release contains a security fix. Users are encouraged to update to this version ASAP.
Content-Length and Transfer-Encoding headers to prevent request smuggling.Connection: Upgrade header in Camel-Case when camel-case header formatting is enabled.#3953HeaderMap iterators' len() and size_hint() implementations for multi-value headers.rand dependency to 0.10.sha1 dependency to 0.11.ServiceConfigBuilder::h1_write_buffer_size() and HttpServiceBuilder::h1_write_buffer_size().Minimum supported Rust version (MSRV) is now 1.88.
TCP_NODELAY. #3918Properly wake Payload receivers when feeding errors or EOF.
ServiceConfigBuilder type to facilitate future configuration extensions.Prevent more hangs after client disconnects.
TestRequest::set_payload() now sets a Content-Length header.Add Client::query() method for constructing HTTP QUERY requests.
Client::query() method for constructing HTTP QUERY requests.Parse all Connection header options when validating WebSocket handshakes.
Connection header options when validating WebSocket handshakes.zstd dependency to 0.14.brotli dependency to 9.header::CLEAR_SITE_DATA constant.Extensions::get_or_insert[_with]() methods.From<Bytes> for Payload.From<Vec<u8>> for Payload.brotli dependency to 7.Add camel-case header controls to WebsocketsRequest via camel_case_headers() and set_camel_case_headers() .
WebsocketsRequest via camel_case_headers() and set_camel_case_headers().hickory-resolver dependency to 0.26.FromIterator<(HeaderName, HeaderValue)> for HeaderMap.Add error::InvalidStatusCode re-export.
error::InvalidStatusCode re-export.Add {h1::H1Service, h2::H2Service, HttpService}::rustls_0_23() and HttpService::rustls_0_23_with_config() service constructors.
rustls-0_23 crate feature{h1::H1Service, h2::H2Service, HttpService}::rustls_0_23() and HttpService::rustls_0_23_with_config() service constructors.brotli dependency to 6.Add {h1::H1Service, h2::H2Service, HttpService}::rustls_0_22() and HttpService::rustls_0_22_with_config() service constructors.
rustls-0_22 crate feature.{h1::H1Service, h2::H2Service, HttpService}::rustls_0_22() and HttpService::rustls_0_22_with_config() service constructors.From<&HeaderMap> for http::HeaderMap.Prevent hang when returning zero-sized response bodies through compression layer.
Implement From for http::HeaderMap.
From<HeaderMap> for http::HeaderMap.zstd dependency to 0.13.Add TestServer::{query, squery}() methods for constructing HTTP QUERY requests.
TestServer::{query, squery}() methods for constructing HTTP QUERY requests.rustls-0_20 crate feature.{h1::H1Service, h2::H2Service, HttpService}::rustls_021() and HttpService::rustls_021_with_config() service constructors.body::to_bytes_limited() function.body::BodyLimitExceeded error type.time dependency.Use correct http version requirement to ensure support for const HeaderName definitions.
http version requirement to ensure support for const HeaderName definitions.Remove unused direct actix-tls dependency.
actix-tls dependency.MessageBody for Cow<'static, str> and Cow<'static, [u8]>. #2959MessageBody for &mut B where B: MessageBody + Unpin. #2868MessageBody for Pin<B> where B::Target: MessageBody. #2868HttpService::tcp_auto_h2c(). #2957HeaderMap::retain(). #2955header module. #2956 #2968
CACHE_STATUSCDN_CACHE_CONTROLCROSS_ORIGIN_EMBEDDER_POLICYCROSS_ORIGIN_OPENER_POLICYPERMISSIONS_POLICYX_FORWARDED_FORX_FORWARDED_HOSTX_FORWARDED_PROTOExtensions. #2890Minimum supported Rust version (MSRV) is now 1.59 due to transitive time dependency.
time dependency.Fix parsing ambiguity in Transfer-Encoding and Content-Length headers for HTTP/1.0 requests. [#2794]
Minimum supported Rust version (MSRV) is now 1.57 due to transitive time dependency.
time dependency.Minimum supported Rust version (MSRV) is now 1.56 due to transitive hashbrown dependency.
Document on docs.rs with ws feature enabled.
ws feature enabled.Allow spaces between header name and colon when parsing responses. [#2684]
Fix encoding camel-case header names with more than one hyphen. [#2683]
Fix panic in H1 dispatcher when pipelining is used with keep-alive. [#2678]
on_connect (previously deprecated) methods have been removed; use on_connect_ext. [#1857]
actix-* to Tokio v1-based versions. #1813bytes to 1.0. #1813h2 to 0.3. #1813rustls to 0.20.0. #2414language-tags to 0.3.tokio to 1.body::to_bytes for async collecting message body into Bytes. #2158TryIntoHeaderPair; allows using typed and untyped headers in the same methods. #1869ContentEncoding::to_header_value(). #2501header::QualityItem::{max, min}(). #2486header::QualityItem::zero() that uses Quality::ZERO. #2501HeaderMap::drain() as an efficient draining iterator. #1964HeaderMap::len_keys() has the behavior of the old len method. #1964MessageBody::boxed trait method for wrapping boxing types efficiently. #2520MessageBody::try_into_bytes trait method, with default implementation, for optimizations on body types that complete in exactly one poll. #2522Request::conn_data(). #2491Request::take_conn_data(). #2491Request::take_req_data(). #2487Response::{ok, bad_request, not_found, internal_server_error}(). #2159Response::into_body() that consumes response and returns body type. #2201Response::map_into_boxed_body(). #2468ResponseBuilder::append_header() method which allows using typed and untyped headers. #1869ResponseBuilder::insert_header() method which allows using typed and untyped headers. #1869ResponseHead::set_camel_case_headers(). #2587TestRequest::insert_header() method which allows using typed and untyped headers. #1869Clone for ws::HandshakeError. #2468Clone for body::AnyBody<S> where S: Clone. #2448Clone for RequestHead. #2487Clone for ResponseHead. #2585Copy for QualityItem<T> where T: Copy. #2501Default for ContentEncoding. #1912Default for HttpServiceBuilder. #2611Default for KeepAlive. #2611Default for Response. #2201Default for ws::Codec. #1920Display for header::Quality. #2486Eq for header::ContentEncoding. #2501ExactSizeIterator and FusedIterator for all HeaderMap iterators. #2470From<Duration> for KeepAlive. #2611From<Option<Duration>> for KeepAlive. #2611From<Vec<u8>> for Response<Vec<u8>>. #2625FromStr for ContentEncoding. #1912Header for ContentEncoding. #1912IntoHeaderValue for ContentEncoding. #1912IntoIterator for HeaderMap. #1964MessageBody for bytestring::ByteString. #2468MessageBody for Pin<Box<T>> where T: MessageBody. #2152StatusCode, Method, Version and Uri at the crate root. #2171ContentEncoding and ConnectionType at the crate root. #2171Quality::ZERO associated constant equivalent to q=0. #2501header::Quality::{MAX, MIN} associated constants equivalent to q=1 and q=0.001, respectively. #2486ServiceConfig::client_timeout; defaults to 5 seconds. #2483#[must_use] for ws::Codec to prevent subtle bugs. #1920Protocol enum is now marked #[non_exhaustive].error::DispatcherError enum is now marked #[non_exhaustive]. #2624ContentEncoding is now marked #[non_exhaustive]. #2377#[non_exhaustive]. #2161PayloadStream to BoxedPayloadStream. #2545Response no longer has a default. #2152ServiceConfig::{client_timer_expire => client_request_deadline}. #2611ServiceConfig::{client_disconnect_timer => client_disconnect_deadline}. #2611h1::Codec::{keepalive => keep_alive}. #2611h1::Codec::{keepalive_enabled => keep_alive_enabled}. #2611h1::ClientCodec::{keepalive => keep_alive}. #2611h1::ClientPayloadCodec::{keepalive => keep_alive}. #2611header::EntityTag::{weak => new_weak, strong => new_strong}. #2565TryIntoHeaderValue::{try_into => try_into_value} to avoid ambiguity with std TryInto trait. #1894ServiceConfig now return std::time::Instants instead of Tokio's wrapper type. #2611Response where ResponseBody<B> was received or returned now simply use B. #2201encoding::Encoder::response now returns AnyBody<Encoder<B>>. #2448Extensions::insert returns replaced item. #1904HeaderMap::get_all now returns a std::slice::Iter. #2527HeaderMap::insert now returns iterator of removed values. #1964HeaderMap::len now returns number of values instead of number of keys. #1964HeaderMap::remove now returns iterator of removed values. #1964ResponseBuilder::body(B) now returns Response<EitherBody<B>>. #2468ResponseBuilder::content_type now takes an impl TryIntoHeaderValue to support using typed mime types. #1894ResponseBuilder::finish() now returns Response<EitherBody<()>>. #2468ResponseBuilder::json now takes impl Serialize. #2052ResponseBuilder::message_body now returns a Result. #2201∑ServiceConfig::keep_alive now returns a KeepAlive. #2611ws::hash_key now returns array. #2035Stream for Payload no longer requires the Stream variant be Unpin. #2545Future for h1::SendResponse no longer requires the body type be Unpin. #2545Stream for encoding::Decoder no longer requires the stream type be Unpin. #2545From for error types now return a Response<BoxBody>. #2468header module is now public. #2171uri module is now public. #2171RequestHead. Instead it is a distinct part of a Request. #2487Into<Error> to Into<Response<BoxBody>>. #2253Into<Error> to Into<Box<dyn std::error::Error>>. #2253header::GetAll iterator to be same as insertion order. #2467on_connect_ext callbacks is now accessible only from the new Request::conn_data() method. #2491brotli crate. #2538Vary header is now correctly sent along with compressed content. #2501ContentEncoding's Identity variant can now be parsed from a string. #2501HttpServer::{listen_rustls(), bind_rustls()} now honor the ALPN protocols in the configuration parameter. [#2226]Into<Error> bound on Encoder body types. #2375Unpin bound on ResponseBuilder::streaming. #2253BodyStream and SizedStream are no longer restricted to Unpin types. #2152header::qitem helper. Replaced with header::QualityItem::max. #2486body::Body; replaced with EitherBody and BoxBody. #2468body::ResponseBody. #2446ConnectError::SslHandshakeError and re-export of HandshakeError. Due to the removal of this type from tokio-openssl crate. OpenSSL handshake error now returns ConnectError::SslError. #1813error::Canceled re-export. #1994error::Result type alias. #2201error::BlockingError #2660InternalError and all the error types it constructed were moved up to actix-web. #2215actix-web. [2094]http crate's HeaderMap types in addition to ours. #2171ContentEncoding::is_compression(). #2501h1::Payload::readany(). #2545HttpMessage::cookie[s]() trait methods. #2065HttpServiceBuilder::new(); use default instead. #2611on_connect (previously deprecated) methods have been removed; use on_connect_ext. #1857Response::build_from(). #2159Response::error() #2205Response::take_body() and old Response::into_body() method that casted body type. #2201Response's status code builders. #2159ResponseBuilder::{if_true, if_some}() (previously deprecated). #2148ResponseBuilder::{set, set_header}(); use ResponseBuilder::insert_header(). #1869ResponseBuilder::extensions[_mut](). #2585ResponseBuilder::header(); use ResponseBuilder::append_header(). #1869ResponseBuilder::json(). #2148ResponseBuilder::json2(). #1903ResponseBuilder::streaming(). #2468ResponseHead::extensions[_mut](). #2585ServiceConfig::{client_timer, keep_alive_timer}(). #2611TestRequest::with_hdr(); use TestRequest::default().insert_header(). #1869TestRequest::with_header(); use TestRequest::default().insert_header(). #1869Copy for ws::Codec. #1920From<Option<usize>> for KeepAlive; use Durations instead. #2611From<serde_json::Value> for Body. #2148From<usize> for KeepAlive; use Durations instead. #2611Future for Response. #2201Future for ResponseBuilder. #2468Into<Error> for Response<Body>. #2215Into<Error> for ResponseBuilder. #2215ResponseError for actix_utils::timeout::TimeoutError. #2127ResponseError for CookieParseError. #2065TryFrom<u16> for header::Quality. #2486http module; most everything it contained is exported at the crate root. #2488cookies module (re-export). #2065client module. Connector types now live in awc. #2425error field from Response. #2205downcast and downcast_get_type_id macros. #2291MessageBody types; use standard Any trait. #2183<details> <summary>3.0.0 Pre-Releases</summary>
TestServer::stop is now async and will wait for the server and system to shutdown. #2442TestServer::client_headers method. #2097actix-server dependency to 2.actix-tls dependency to 3.bytes to 1.0. #1813<details> <summary>3.0.0 Pre-Releases</summary>
Fix h1 dispatcher panic. [1ce58ecb]
No significant changes since 3.0.0-rc.2.
3.0.0-rc.2.Implement From > for Response >. [#2625]
Implement Default for KeepAlive. [#2611]
Default for KeepAlive. #2611From<Duration> for KeepAlive. #2611From<Option<Duration>> for KeepAlive. #2611Default for HttpServiceBuilder. #2611ws feature flag, disabled by default. #2618http2 feature flag, disabled by default. #2618ServiceConfig::{client_timer_expire => client_request_deadline}. #2611ServiceConfig::{client_disconnect_timer => client_disconnect_deadline}. #2611ServiceConfig now return std::time::Instants instead of Tokio's wrapper type. #2611h1::Codec::{keepalive => keep_alive}. #2611h1::Codec::{keepalive_enabled => keep_alive_enabled}. #2611h1::ClientCodec::{keepalive => keep_alive}. #2611h1::ClientPayloadCodec::{keepalive => keep_alive}. #2611ServiceConfig::keep_alive now returns a KeepAlive. #2611Response headers can be sent as camel case using res.head_mut().set_camel_case_headers(true). [#2587]
impl Eq for header::ContentEncoding. [#2501]
impl Eq for header::ContentEncoding. #2501impl Copy for QualityItem where T: Copy. #2501Quality::ZERO equivalent to q=0. #2501QualityItem::zero that uses Quality::ZERO. #2501ContentEncoding::to_header_value(). #2501Quality::MIN is now the smallest non-zero value. #2501QualityItem::min semantics changed with QualityItem::MIN. #2501ContentEncoding::{Br => Brotli}. #2501header::EntityTag::{weak => new_weak, strong => new_strong}. #2565ContentEncoding::Identity can now be parsed from a string. #2501Vary header is now correctly sent along with compressed content. #2501HeaderMap::get_all now returns a std::Iter. [#2527]
HeaderMap::get_all now returns a std::slice::Iter. #2527Payload inner fields are now named. #2545impl Stream for Payload no longer requires the Stream variant be Unpin. #2545impl Future for h1::SendResponse no longer requires the body type be Unpin. #2545impl Stream for encoding::Decoder no longer requires the stream type be Unpin. #2545PayloadStream to BoxedPayloadStream. #2545h1::Payload::readany. #2545New method on MessageBody trait, try_into_bytes, with default implementation, for optimizations on body types that complete in exactly one poll. Repla
MessageBody trait, try_into_bytes, with default implementation, for optimizations on body types that complete in exactly one poll. Replaces is_complete_body and take_complete_body. #2522IntoHeaderPair => TryIntoHeaderPair. #2510TryIntoHeaderPair::{try_into_header_pair => try_into_pair}. #2510IntoHeaderValue => TryIntoHeaderValue. #2510MessageBody::{is_complete_body,take_complete_body}. #2522Add timeout for canceling HTTP/2 server side connection handshake. Default to 5 seconds. [#2483]
ServiceConfig::client_timeout. #2483Response::map_into_boxed_body. #2468body::EitherBody enum. #2468body::None struct. #2468MessageBody for bytestring::ByteString. #2468impl Clone for ws::HandshakeError. #2468#[must_use] for ws::Codec to prevent subtle bugs. #1920impl Default for ws::Codec. #1920header::QualityItem::{max, min}. #2486header::Quality::{MAX, MIN}. #2486impl Display for header::Quality. #2486on_connect_ext callbacks is now accessible only from the new Request::conn_data() method. #2491Request::take_conn_data(). #2491Request::take_req_data(). #2487impl Clone for RequestHead. #2487MessageBody trait, is_complete_body and take_complete_body, both with default implementations, for optimizations on body types that are done in exactly one poll/chunk. #2497boxed method on MessageBody trait for wrapping body type. #2520body::BoxBody::{from_body => new}. #2468Responses returned from Response::{new, ok, etc...} is now BoxBody. #2468Error associated type on MessageBody type now requires impl Error (or similar). #2468Into<Response<BoxBody>>. #2468From implementations on error types now return a Response<BoxBody>. #2468ResponseBuilder::body(B) now returns Response<EitherBody<B>>. #2468ResponseBuilder::finish() now returns Response<EitherBody<()>>. #2468ResponseBuilder::streaming. #2468impl Future for ResponseBuilder. #2468MessageBody bound on types passed to body::AnyBody::new. #2468body::AnyBody to awc. Replaced with EitherBody and BoxBody. #2468impl Copy for ws::Codec. #1920header::qitem helper. Replaced with header::QualityItem::max. #2486impl TryFrom<u16> for header::Quality. #2486http module. Most everything it contained is exported at the crate root. #2488Guarantee ordering of header::GetAll iterator to be same as insertion order. [#2467]
body::AnyBody::empty for quickly creating an empty body. [#2446]
body::AnyBody::empty for quickly creating an empty body. #2446body::AnyBody::none for quickly creating a "none" body. #2456impl Clone for body::AnyBody<S> where S: Clone. #2448body::AnyBody::into_boxed for quickly converting to a type-erased, boxed body type. #2448body::AnyBody::{Message => Body}. #2446body::AnyBody::{from_message => new_boxed}. #2448body::AnyBody::{from_slice => copy_from_slice}. #2448body::{BoxAnyBody => BoxBody}. #2448AnyBody to include a type parameter in Body variant. Defaults to BoxBody. #2448Encoder::response now returns AnyBody<Encoder<B>>. #2448body::AnyBody::Empty; an empty body can now only be represented as a zero-length Bytes variant. #2446body::BodySize::Empty; an empty body can now only be represented as a Sized(0) variant. #2446EncoderError::Boxed; it is no longer required. #2446body::ResponseBody; is function is replaced by the new body::AnyBody enum. #2446Update actix-server to 2.0.0-beta.9. [#2442]
Updated rustls to v0.20. [#2414]
ContentEncoding is now marked #[non_exhaustive]. [#2377]
ContentEncoding is now marked #[non_exhaustive]. #2377One column per quarter.