actix-http/CHANGES.md
Connection: Upgrade header in Camel-Case when camel-case header formatting is enabled.#3953HeaderMap iterators' len() and size_hint() implementations for multi-value headers.TCP_NODELAY. #3918ServiceConfigBuilder type to facilitate future configuration extensions.TestRequest::set_payload() now sets a Content-Length header.brotli dependency to 8.header::CLEAR_SITE_DATA constant.Extensions::get_or_insert[_with]() methods.From<Bytes> for Payload.From<Vec<u8>> for Payload.brotli dependency to 7.FromIterator<(HeaderName, HeaderValue)> for HeaderMap.error::InvalidStatusCode re-export.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.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.From<HeaderMap> for http::HeaderMap.zstd dependency to 0.13.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.http version requirement to ensure support for const HeaderName definitions.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. #2890time dependency.time dependency.hashbrown dependency.ws feature enabled.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. #21833.0.0-rc.2.From<Vec<u8>> for Response<Vec<u8>>. #2625error::DispatcherError enum is now marked #[non_exhaustive]. #2624Default 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. #2611ServiceConfig::{client_timer, keep_alive_timer}. #2611impl From<usize> for KeepAlive; use Durations instead. #2611impl From<Option<usize>> for KeepAlive; use Durations instead. #2611HttpServiceBuilder::new; use default instead. #2611res.head_mut().set_camel_case_headers(true). #2587ResponseHead now implements Clone. #2585brotli crate. #2538impl 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::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. #2545MessageBody 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}. #2522ServiceConfig::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. #2488header::GetAll iterator to be same as insertion order. #2467header::map module. #2467ExactSizeIterator and FusedIterator for all HeaderMap iterators. #2470actix-tls to 3.0.0-rc.1. #2474body::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. #2446actix-server to 2.0.0-beta.9. #2442ContentEncoding is now marked #[non_exhaustive]. #2377Into<Error> bound on Encoder body types. #2375downcast and downcast_get_type_id macros. #2291body::Body as body::AnyBody. #2215BoxAnyBody: a boxed message body with boxed errors. #2183http crate's Error type as error::HttpError. #2171StatusCode, Method, Version and Uri at the crate root. #2171ContentEncoding and ConnectionType at the crate root. #2171Response::into_body that consumes response and returns body type. #2201impl Default for Response. #2201ContentEncoding. #2244MessageBody trait now has an associated Error type. #2183Into<Error> to Into<Response<AnyBody>>. #2253Into<Error> to Into<Box<dyn std::error::Error>>. #2253Response where ResponseBody<B> was received or returned now simply use B. #2201header mod is now public. #2171uri mod is now public. #2171language-tags to 0.3.error to debug for the log line that is emitted when a 500 Internal Server Error is built using HttpResponse::from_error. #2201ResponseBuilder::message_body now returns a Result. #2201Unpin bound on ResponseBuilder::streaming. #2253HttpServer::{listen_rustls(), bind_rustls()} now honor the ALPN protocols in the configuration parameter. [#2226]http crate's HeaderMap types in addition to ours. #2171MessageBody types. #2183error::Result alias. #2201Response and Response::error. #2205impl Future for Response. #2201Response::take_body and old Response::into_body method that casted body type. #2201InternalError and all the error types it constructed. #2215impl Into) of Response<Body> and ResponseBuilder to Error. #2215impl<T: MessageBody> MessageBody for Pin<Box<T>>. #2152Response::{ok, bad_request, not_found, internal_server_error}. #2159body::to_bytes for async collecting message body into Bytes. #2158Response no longer has a default. #2152Message variant of body::Body is now Pin<Box<dyn MessageBody>>. #2152BodyStream and SizedStream are no longer restricted to Unpin types. #2152#[non_exhaustive]. #2161cookies feature flag. #2065cookies mod (re-export). #2065HttpMessage trait loses the cookies and cookie methods. #2065impl ResponseError for CookieParseError. #2065ResponseBuilder: if_true, if_some. #2148ResponseBuilder::json. #2148ResponseBuilder::{set_header, header}. #2148impl From<serde_json::Value> for Body. #2148Response::build_from. #2159Response. #2159client::Connector::handshake_timeout method for customizing TLS connection handshake timeout. #2081client::ConnectorService as client::Connector::finish method's return type #2081client::ConnectionIo trait alias #2081client::Connector type now only have one generic type for actix_service::Service. #2063ResponseError impl for actix_utils::timeout::TimeoutError. #2127cookies is now optional and disabled by default. #1981ws::hash_key now returns array. #2035ResponseBuilder::json now takes impl Serialize. #2052futures_channel::oneshot::Canceled is removed from error mod. #1994ResponseError impl for futures_channel::oneshot::Canceled is removed. #1994TryIntoHeaderPair trait that allows using typed and untyped headers in the same methods. #1869ResponseBuilder::insert_header method which allows using typed headers. #1869ResponseBuilder::append_header method which allows using typed headers. #1869TestRequest::insert_header method which allows using typed headers. #1869ContentEncoding implements all necessary header traits. #1912HeaderMap::len_keys has the behavior of the old len method. #1964HeaderMap::drain as an efficient draining iterator. #1964IntoIterator for owned HeaderMap. #1964trust-dns optional feature to enable trust-dns-resolver as client dns resolver. #1969ResponseBuilder::content_type now takes an impl TryIntoHeaderValue to support using typed mime types. #1894TryIntoHeaderValue::{try_into => try_into_value} to avoid ambiguity with std TryInto trait. #1894Extensions::insert returns Option of replaced item. #1904HttpResponseBuilder::json2(). #1903HttpResponseBuilder::json() to receive data by value and reference. #1903client::error::ConnectError Resolver variant contains Box<dyn std::error::Error> type. #1905client::ConnectorConfig default timeout changed to 5 seconds. #1905BlockingError type to a unit struct. It's now only triggered when blocking thread pool is dead. #1957HeaderMap::len now returns number of values instead of number of keys. #1964HeaderMap::insert now returns iterator of removed values. #1964HeaderMap::remove now returns iterator of removed values. #1964ResponseBuilder::set; use ResponseBuilder::insert_header. #1869ResponseBuilder::set_header; use ResponseBuilder::insert_header. #1869ResponseBuilder::header; use ResponseBuilder::append_header. #1869TestRequest::with_hdr; use TestRequest::default().insert_header(). #1869TestRequest::with_header; use TestRequest::default().insert_header(). #1869actors optional feature. #1969ResponseError impl for actix::MailboxError. #1969HeaderMap. #1964Http3 to Protocol enum for future compatibility and also mark #[non_exhaustive].actix-* dependencies to tokio 1.0 based versions. #1813rand to 0.8.bytes to 1.0. #1813h2 to 0.3. #1813ws::Message::Text enum variant now contains a bytestring::ByteString. #1864on_connect methods have been removed. Prefer the new on_connect_ext technique. #1857ResponseError impl for actix::actors::resolver::ResolverError due to deprecate of resolver actor. #1813ConnectError::SslHandshakeError and re-export of HandshakeError. due to the removal of this type from tokio-openssl crate. openssl handshake error would return as ConnectError::SslError. #1813actix-threadpool dependency. Use actix_rt::task::spawn_blocking. Due to this change actix_threadpool::BlockingError type is moved into actix_http::error module. #1878brotli crate. ad7e3c06Accept::mime_precedence and Accept::mime_preference. #1793TryFrom<u16> and TryFrom<f32> for http::header::Quality. #1797transfer-encoding: chunked and Content-Length for 1XX and 204 responses. #1767serde_urlencoded to 0.7. #1773on_connect_ext methods for on-connect handling. #1754base64 to 0.13. #1744pin-project to 1.0. #1733ResponseBuilder::{if_some, if_true}. #17602.0.0-beta.4.client::pool::ConnectorPoolSupport. #1626cookie crate. #1558sha-1 to 0.9. #1586BodySize::Sized64 variant has been removed. BodySize::Sized now receives a u64 instead of a usize.base64 dependency to 0.12SameSite=None #1503std::error::Error for our custom errors #1422failure support for ResponseError since that crate will be deprecated in the near future.actix-connect and actix-tls dependency to 2.0.0-alpha.1. #1395time dependency to 0.2.7.actors.Pin<&mut Self> instead of &mut self in the poll_next().SameSite=None cookies to be sent in a response.flate2-xxx features with compressUpgrade service readiness before calling itstd::futurefilename* param in the Content-Disposition header of actix_files::NamedFile to be more compatible. (#1151)std::convert::Infallible as actix_http::error::ErrorResponseError rendered with text/plain; charset=utf-8 header [#1118]Rc<RequestHead> in addition to sending HTTP requests with RequestHeadbyteorder-dependency in favor of stdlib-implementationrustls supportClone impl for HeaderMapClonableService with local copyrand dependency version to 0.7on-connect callback, HttpServiceBuilder::on_connect() #946encoding_rs crate instead of unmaintained encoding crateCopy and Clone impls for ws::CodecServerConfig config.OneRequest serviceCamel-CaseRequest::peer_addr() and RequestHead::peer_addractix_http::encoding always availableh1::SendResponse future.Expect handlerstd::error::Error impl for Error