mirror of https://github.com/fafhrd91/actix-web
				
				
				
			
		
			
				
	
	
	
		
			50 KiB
		
	
	
	
	
	
			
		
		
	
	
			50 KiB
		
	
	
	
	
	
Changes
Unreleased
3.11.2
- Properly wake Payload receivers when feeding errors or EOF.
 - Add 
ServiceConfigBuildertype to facilitate future configuration extensions. - Add a configuration option to allow/disallow half closed connections in HTTP/1. This defaults to allow, reverting the change made in 3.11.1.
 - Shutdown connections when HTTP Responses are written without reading full Requests.
 
3.11.1
- Prevent more hangs after client disconnects.
 - More malformed WebSocket frames are now gracefully rejected.
 - Using 
TestRequest::set_payload()now sets a Content-Length header. 
3.11.0
- Update 
brotlidependency to8. 
3.10.0
Added
- Add 
header::CLEAR_SITE_DATAconstant. - Add 
Extensions::get_or_insert[_with]()methods. - Implement 
From<Bytes>forPayload. - Implement 
From<Vec<u8>>forPayload. 
Changed
- Update 
brotlidependency to7. - Minimum supported Rust version (MSRV) is now 1.75.
 
3.9.0
Added
- Implement 
FromIterator<(HeaderName, HeaderValue)>forHeaderMap. 
3.8.0
Added
- Add 
error::InvalidStatusCodere-export. 
3.7.0
Added
- Add 
rustls-0_23crate feature - Add 
{h1::H1Service, h2::H2Service, HttpService}::rustls_0_23()andHttpService::rustls_0_23_with_config()service constructors. 
Changed
- Update 
brotlidependency to6. - Minimum supported Rust version (MSRV) is now 1.72.
 
3.6.0
Added
- Add 
rustls-0_22crate feature. - Add 
{h1::H1Service, h2::H2Service, HttpService}::rustls_0_22()andHttpService::rustls_0_22_with_config()service constructors. - Implement 
From<&HeaderMap>forhttp::HeaderMap. 
3.5.1
Fixed
- Prevent hang when returning zero-sized response bodies through compression layer.
 
3.5.0
Added
- Implement 
From<HeaderMap>forhttp::HeaderMap. 
Changed
- Updated 
zstddependency to0.13. 
Fixed
- Prevent compression of zero-sized response bodies.
 
3.4.0
Added
- Add 
rustls-0_20crate feature. - Add 
{h1::H1Service, h2::H2Service, HttpService}::rustls_021()andHttpService::rustls_021_with_config()service constructors. - Add 
body::to_bytes_limited()function. - Add 
body::BodyLimitExceedederror type. 
Changed
- Minimum supported Rust version (MSRV) is now 1.68 due to transitive 
timedependency. 
3.3.1
Fixed
- Use correct 
httpversion requirement to ensure support for constHeaderNamedefinitions. 
3.3.0
Added
- Implement 
MessageBodyforCow<'static, str>andCow<'static, [u8]>. #2959 - Implement 
MessageBodyfor&mut BwhereB: MessageBody + Unpin. #2868 - Implement 
MessageBodyforPin<B>whereB::Target: MessageBody. #2868 - Automatic h2c detection via new service finalizer 
HttpService::tcp_auto_h2c(). #2957 HeaderMap::retain(). #2955- Header name constants in 
headermodule. #2956 #2968CACHE_STATUSCDN_CACHE_CONTROLCROSS_ORIGIN_EMBEDDER_POLICYCROSS_ORIGIN_OPENER_POLICYPERMISSIONS_POLICYX_FORWARDED_FORX_FORWARDED_HOSTX_FORWARDED_PROTO
 
Fixed
- Fix non-empty body of HTTP/2 HEAD responses. #2920
 
Performance
- Improve overall performance of operations on 
Extensions. #2890 
3.2.2
Changed
- Minimum supported Rust version (MSRV) is now 1.59 due to transitive 
timedependency. 
Fixed
- Avoid possibility of dispatcher getting stuck while back-pressuring I/O. #2369
 
3.2.1
Fixed
- Fix parsing ambiguity in Transfer-Encoding and Content-Length headers for HTTP/1.0 requests. #2794
 
3.2.0
Changed
- Minimum supported Rust version (MSRV) is now 1.57 due to transitive 
timedependency. 
Fixed
- Websocket parser no longer throws endless overflow errors after receiving an oversized frame. #2790
 - Retain previously set Vary headers when using compression encoder. #2798
 
3.1.0
Changed
- Minimum supported Rust version (MSRV) is now 1.56 due to transitive 
hashbrowndependency. 
Fixed
- Revert broken fix in #2624 that caused erroneous 500 error responses. Temporarily re-introduces #2357 bug. #2779
 
3.0.4
Fixed
- Document on docs.rs with 
wsfeature enabled. 
3.0.3
Fixed
- Allow spaces between header name and colon when parsing responses. #2684
 
3.0.2
Fixed
- Fix encoding camel-case header names with more than one hyphen. #2683
 
3.0.1
- Fix panic in H1 dispatcher when pipelining is used with keep-alive. #2678
 
3.0.0
Dependencies
- Updated 
actix-*to Tokio v1-based versions. #1813 - Updated 
bytesto1.0. #1813 - Updated 
h2to0.3. #1813 - Updated 
rustlsto0.20.0. #2414 - Updated 
language-tagsto0.3. - Updated 
tokioto1. 
Added
- Crate Features:
 - Functions:
body::to_bytesfor async collecting message body into Bytes. #2158
 - Traits:
TryIntoHeaderPair; allows using typed and untyped headers in the same methods. #1869
 - Types:
 - Variants:
 - Methods:
ContentEncoding::to_header_value(). #2501header::QualityItem::{max, min}(). #2486header::QualityItem::zero()that usesQuality::ZERO. #2501HeaderMap::drain()as an efficient draining iterator. #1964HeaderMap::len_keys()has the behavior of the oldlenmethod. #1964MessageBody::boxedtrait method for wrapping boxing types efficiently. #2520MessageBody::try_into_bytestrait 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. #1869
 - Implementations:
- Implement 
Clone for ws::HandshakeError. #2468 - Implement 
Cloneforbody::AnyBody<S> where S: Clone. #2448 - Implement 
CloneforRequestHead. #2487 - Implement 
CloneforResponseHead. #2585 - Implement 
CopyforQualityItem<T> where T: Copy. #2501 - Implement 
DefaultforContentEncoding. #1912 - Implement 
DefaultforHttpServiceBuilder. #2611 - Implement 
DefaultforKeepAlive. #2611 - Implement 
DefaultforResponse. #2201 - Implement 
Defaultforws::Codec. #1920 - Implement 
Displayforheader::Quality. #2486 - Implement 
Eqforheader::ContentEncoding. #2501 - Implement 
ExactSizeIteratorandFusedIteratorfor allHeaderMapiterators. #2470 - Implement 
From<Duration>forKeepAlive. #2611 - Implement 
From<Option<Duration>>forKeepAlive. #2611 - Implement 
From<Vec<u8>>forResponse<Vec<u8>>. #2625 - Implement 
FromStrforContentEncoding. #1912 - Implement 
HeaderforContentEncoding. #1912 - Implement 
IntoHeaderValueforContentEncoding. #1912 - Implement 
IntoIteratorforHeaderMap. #1964 - Implement 
MessageBodyforbytestring::ByteString. #2468 - Implement 
MessageBodyforPin<Box<T>> where T: MessageBody. #2152 
 - Implement 
 - Misc:
- Re-export 
StatusCode,Method,VersionandUriat the crate root. #2171 - Re-export 
ContentEncodingandConnectionTypeat the crate root. #2171 Quality::ZEROassociated constant equivalent toq=0. #2501header::Quality::{MAX, MIN}associated constants equivalent toq=1andq=0.001, respectively. #2486- Timeout for canceling HTTP/2 server side connection handshake. Configurable with 
ServiceConfig::client_timeout; defaults to 5 seconds. #2483 #[must_use]forws::Codecto prevent subtle bugs. #1920
 - Re-export 
 
Changed
- Traits:
 - Types:
Protocolenum is now marked#[non_exhaustive].error::DispatcherErrorenum is now marked#[non_exhaustive]. #2624ContentEncodingis now marked#[non_exhaustive]. #2377- Error enums are marked 
#[non_exhaustive]. #2161 - Rename 
PayloadStreamtoBoxedPayloadStream. #2545 - The body type parameter of 
Responseno longer has a default. #2152 
 - Enum Variants:
 - Methods:
- Rename 
ServiceConfig::{client_timer_expire => client_request_deadline}. #2611 - Rename 
ServiceConfig::{client_disconnect_timer => client_disconnect_deadline}. #2611 - Rename 
h1::Codec::{keepalive => keep_alive}. #2611 - Rename 
h1::Codec::{keepalive_enabled => keep_alive_enabled}. #2611 - Rename 
h1::ClientCodec::{keepalive => keep_alive}. #2611 - Rename 
h1::ClientPayloadCodec::{keepalive => keep_alive}. #2611 - Rename 
header::EntityTag::{weak => new_weak, strong => new_strong}. #2565 - Rename 
TryIntoHeaderValue::{try_into => try_into_value}to avoid ambiguity with stdTryIntotrait. #1894 - Deadline methods in 
ServiceConfignow returnstd::time::Instants instead of Tokio's wrapper type. #2611 - Places in 
ResponsewhereResponseBody<B>was received or returned now simply useB. #2201 encoding::Encoder::responsenow returnsAnyBody<Encoder<B>>. #2448Extensions::insertreturns replaced item. #1904HeaderMap::get_allnow returns astd::slice::Iter. #2527HeaderMap::insertnow returns iterator of removed values. #1964HeaderMap::lennow returns number of values instead of number of keys. #1964HeaderMap::removenow returns iterator of removed values. #1964ResponseBuilder::body(B)now returnsResponse<EitherBody<B>>. #2468ResponseBuilder::content_typenow takes animpl TryIntoHeaderValueto support using typedmimetypes. #1894ResponseBuilder::finish()now returnsResponse<EitherBody<()>>. #2468ResponseBuilder::jsonnow takesimpl Serialize. #2052ResponseBuilder::message_bodynow returns aResult. #2201∑ServiceConfig::keep_alivenow returns aKeepAlive. #2611ws::hash_keynow returns array. #2035
 - Rename 
 - Trait Implementations:
- Implementation of 
StreamforPayloadno longer requires theStreamvariant beUnpin. #2545 - Implementation of 
Futureforh1::SendResponseno longer requires the body type beUnpin. #2545 - Implementation of 
Streamforencoding::Decoderno longer requires the stream type beUnpin. #2545 - Implementation of 
Fromfor error types now return aResponse<BoxBody>. #2468 
 - Implementation of 
 - Misc:
headermodule is now public. #2171urimodule is now public. #2171- Request-local data container is no longer part of a 
RequestHead. Instead it is a distinct part of aRequest. #2487 - All error trait bounds in server service builders have changed from 
Into<Error>toInto<Response<BoxBody>>. #2253 - All error trait bounds in message body and stream impls changed from 
Into<Error>toInto<Box<dyn std::error::Error>>. #2253 - Guarantee ordering of 
header::GetAlliterator to be same as insertion order. #2467 - Connection data set through the 
on_connect_extcallbacks is now accessible only from the newRequest::conn_data()method. #2491 - Brotli (de)compression support is now provided by the 
brotlicrate. #2538 - Minimum supported Rust version (MSRV) is now 1.54.
 
 
Fixed
- A 
Varyheader is now correctly sent along with compressed content. #2501 - HTTP/1.1 dispatcher correctly uses client request timeout. #2611
 - Fixed issue where handlers that took payload but then dropped without reading it to EOF it would cause keep-alive connections to become stuck. #2624
 ContentEncoding'sIdentityvariant can now be parsed from a string. #2501HttpServer::{listen_rustls(), bind_rustls()}now honor the ALPN protocols in the configuration parameter. [#2226]- Remove unnecessary 
Into<Error>bound onEncoderbody types. #2375 - Remove unnecessary 
Unpinbound onResponseBuilder::streaming. #2253 BodyStreamandSizedStreamare no longer restricted toUnpintypes. #2152- Fixed slice creation pointing to potential uninitialized data on h1 encoder. #2364
 - Fixed quality parse error in Accept-Encoding header. #2344
 
Removed
- Crate Features:
 - Functions:
header::qitemhelper. Replaced withheader::QualityItem::max. #2486
 - Types:
body::Body; replaced withEitherBodyandBoxBody. #2468body::ResponseBody. #2446ConnectError::SslHandshakeErrorand re-export ofHandshakeError. Due to the removal of this type fromtokio-opensslcrate. OpenSSL handshake error now returnsConnectError::SslError. #1813error::Canceledre-export. #1994error::Resulttype alias. #2201error::BlockingError#2660InternalErrorand all the error types it constructed were moved up toactix-web. #2215- Typed HTTP headers; they have moved up to 
actix-web. [2094] - Re-export of 
httpcrate'sHeaderMaptypes in addition to ours. #2171 
 - Enum Variants:
 - Methods:
ContentEncoding::is_compression(). #2501h1::Payload::readany(). #2545HttpMessage::cookie[s]()trait methods. #2065HttpServiceBuilder::new(); usedefaultinstead. #2611on_connect(previously deprecated) methods have been removed; useon_connect_ext. #1857Response::build_from(). #2159Response::error()#2205Response::take_body()and oldResponse::into_body()method that casted body type. #2201Response's status code builders. #2159ResponseBuilder::{if_true, if_some}()(previously deprecated). #2148ResponseBuilder::{set, set_header}(); useResponseBuilder::insert_header(). #1869ResponseBuilder::extensions[_mut](). #2585ResponseBuilder::header(); useResponseBuilder::append_header(). #1869ResponseBuilder::json(). #2148ResponseBuilder::json2(). #1903ResponseBuilder::streaming(). #2468ResponseHead::extensions[_mut](). #2585ServiceConfig::{client_timer, keep_alive_timer}(). #2611TestRequest::with_hdr(); useTestRequest::default().insert_header(). #1869TestRequest::with_header(); useTestRequest::default().insert_header(). #1869
 - Trait implementations:
- Implementation of 
Copyforws::Codec. #1920 - Implementation of 
From<Option<usize>> for KeepAlive; useDurations instead. #2611 - Implementation of 
From<serde_json::Value>forBody. #2148 - Implementation of 
From<usize> for KeepAlive; useDurations instead. #2611 - Implementation of 
FutureforResponse. #2201 - Implementation of 
FutureforResponseBuilder. #2468 - Implementation of 
Into<Error>forResponse<Body>. #2215 - Implementation of 
Into<Error>forResponseBuilder. #2215 - Implementation of 
ResponseErrorforactix_utils::timeout::TimeoutError. #2127 - Implementation of 
ResponseErrorforCookieParseError. #2065 - Implementation of 
TryFrom<u16>forheader::Quality. #2486 
 - Implementation of 
 - Misc:
httpmodule; most everything it contained is exported at the crate root. #2488cookiesmodule (re-export). #2065clientmodule. Connector types now live inawc. #2425errorfield fromResponse. #2205downcastanddowncast_get_type_idmacros. #2291- Down-casting for 
MessageBodytypes; use standardAnytrait. #2183 
 
3.0.0 Pre-Releases
3.0.0-rc.4
Fixed
- Fix h1 dispatcher panic. 1ce58ecb
 
3.0.0-rc.3
- No significant changes since 
3.0.0-rc.2. 
3.0.0-rc.2
Added
- Implement 
From<Vec<u8>>forResponse<Vec<u8>>. #2625 
Changed
error::DispatcherErrorenum is now marked#[non_exhaustive]. #2624
Fixed
- Issue where handlers that took payload but then dropped without reading it to EOF it would cause keep-alive connections to become stuck. #2624
 
3.0.0-rc.1
Added
- Implement 
DefaultforKeepAlive. #2611 - Implement 
From<Duration>forKeepAlive. #2611 - Implement 
From<Option<Duration>>forKeepAlive. #2611 - Implement 
DefaultforHttpServiceBuilder. #2611 - Crate 
wsfeature flag, disabled by default. #2618 - Crate 
http2feature flag, disabled by default. #2618 
Changed
- Rename 
ServiceConfig::{client_timer_expire => client_request_deadline}. #2611 - Rename 
ServiceConfig::{client_disconnect_timer => client_disconnect_deadline}. #2611 - Deadline methods in 
ServiceConfignow returnstd::time::Instants instead of Tokio's wrapper type. #2611 - Rename 
h1::Codec::{keepalive => keep_alive}. #2611 - Rename 
h1::Codec::{keepalive_enabled => keep_alive_enabled}. #2611 - Rename 
h1::ClientCodec::{keepalive => keep_alive}. #2611 - Rename 
h1::ClientPayloadCodec::{keepalive => keep_alive}. #2611 ServiceConfig::keep_alivenow returns aKeepAlive. #2611
Fixed
- HTTP/1.1 dispatcher correctly uses client request timeout. #2611
 
Removed
ServiceConfig::{client_timer, keep_alive_timer}. #2611impl From<usize> for KeepAlive; useDurations instead. #2611impl From<Option<usize>> for KeepAlive; useDurations instead. #2611HttpServiceBuilder::new; usedefaultinstead. #2611
3.0.0-beta.19
Added
- Response headers can be sent as camel case using 
res.head_mut().set_camel_case_headers(true). #2587 ResponseHeadnow implementsClone. #2585
Changed
- Brotli (de)compression support is now provided by the 
brotlicrate. #2538 
Removed
3.0.0-beta.18
Added
impl Eqforheader::ContentEncoding. #2501impl CopyforQualityItemwhereT: Copy. #2501Quality::ZEROequivalent toq=0. #2501QualityItem::zerothat usesQuality::ZERO. #2501ContentEncoding::to_header_value(). #2501
Changed
Quality::MINis now the smallest non-zero value. #2501QualityItem::minsemantics changed withQualityItem::MIN. #2501- Rename 
ContentEncoding::{Br => Brotli}. #2501 - Rename 
header::EntityTag::{weak => new_weak, strong => new_strong}. #2565 - Minimum supported Rust version (MSRV) is now 1.54.
 
Fixed
ContentEncoding::Identitycan now be parsed from a string. #2501- A 
Varyheader is now correctly sent along with compressed content. #2501 
Removed
3.0.0-beta.17
Changed
HeaderMap::get_allnow returns astd::slice::Iter. #2527Payloadinner fields are now named. #2545impl StreamforPayloadno longer requires theStreamvariant beUnpin. #2545impl Futureforh1::SendResponseno longer requires the body type beUnpin. #2545impl Streamforencoding::Decoderno longer requires the stream type beUnpin. #2545- Rename 
PayloadStreamtoBoxedPayloadStream. #2545 
Removed
h1::Payload::readany. #2545
3.0.0-beta.16
Added
- New method on 
MessageBodytrait,try_into_bytes, with default implementation, for optimizations on body types that complete in exactly one poll. Replacesis_complete_bodyandtake_complete_body. #2522 
Changed
- Rename trait 
IntoHeaderPair => TryIntoHeaderPair. #2510 - Rename 
TryIntoHeaderPair::{try_into_header_pair => try_into_pair}. #2510 - Rename trait 
IntoHeaderValue => TryIntoHeaderValue. #2510 
Removed
MessageBody::{is_complete_body,take_complete_body}. #2522
3.0.0-beta.15
Added
- Add timeout for canceling HTTP/2 server side connection handshake. Default to 5 seconds. #2483
 - HTTP/2 handshake timeout can be configured with 
ServiceConfig::client_timeout. #2483 Response::map_into_boxed_body. #2468body::EitherBodyenum. #2468body::Nonestruct. #2468- Impl 
MessageBodyforbytestring::ByteString. #2468 impl Clone for ws::HandshakeError. #2468#[must_use]forws::Codecto prevent subtle bugs. #1920impl Defaultforws::Codec. #1920header::QualityItem::{max, min}. #2486header::Quality::{MAX, MIN}. #2486impl Displayforheader::Quality. #2486- Connection data set through the 
on_connect_extcallbacks is now accessible only from the newRequest::conn_data()method. #2491 Request::take_conn_data(). #2491Request::take_req_data(). #2487impl CloneforRequestHead. #2487- New methods on 
MessageBodytrait,is_complete_bodyandtake_complete_body, both with default implementations, for optimizations on body types that are done in exactly one poll/chunk. #2497 - New 
boxedmethod onMessageBodytrait for wrapping body type. #2520 
Changed
- Rename 
body::BoxBody::{from_body => new}. #2468 - Body type for 
Responsesreturned fromResponse::{new, ok, etc...}is nowBoxBody. #2468 - The 
Errorassociated type onMessageBodytype now requiresimpl Error(or similar). #2468 - Error types using in service builders now require 
Into<Response<BoxBody>>. #2468 Fromimplementations on error types now return aResponse<BoxBody>. #2468ResponseBuilder::body(B)now returnsResponse<EitherBody<B>>. #2468ResponseBuilder::finish()now returnsResponse<EitherBody<()>>. #2468
Removed
ResponseBuilder::streaming. #2468impl FutureforResponseBuilder. #2468- Remove unnecessary 
MessageBodybound on types passed tobody::AnyBody::new. #2468 - Move 
body::AnyBodytoawc. Replaced withEitherBodyandBoxBody. #2468 impl Copyforws::Codec. #1920header::qitemhelper. Replaced withheader::QualityItem::max. #2486impl TryFrom<u16>forheader::Quality. #2486httpmodule. Most everything it contained is exported at the crate root. #2488
3.0.0-beta.14
Changed
- Guarantee ordering of 
header::GetAlliterator to be same as insertion order. #2467 - Expose 
header::mapmodule. #2467 - Implement 
ExactSizeIteratorandFusedIteratorfor allHeaderMapiterators. #2470 - Update 
actix-tlsto3.0.0-rc.1. #2474 
3.0.0-beta.13
Added
body::AnyBody::emptyfor quickly creating an empty body. #2446body::AnyBody::nonefor quickly creating a "none" body. #2456impl Cloneforbody::AnyBody<S> where S: Clone. #2448body::AnyBody::into_boxedfor quickly converting to a type-erased, boxed body type. #2448
Changed
- Rename 
body::AnyBody::{Message => Body}. #2446 - Rename 
body::AnyBody::{from_message => new_boxed}. #2448 - Rename 
body::AnyBody::{from_slice => copy_from_slice}. #2448 - Rename 
body::{BoxAnyBody => BoxBody}. #2448 - Change representation of 
AnyBodyto include a type parameter inBodyvariant. Defaults toBoxBody. #2448 Encoder::responsenow returnsAnyBody<Encoder<B>>. #2448
Removed
body::AnyBody::Empty; an empty body can now only be represented as a zero-lengthBytesvariant. #2446body::BodySize::Empty; an empty body can now only be represented as aSized(0)variant. #2446EncoderError::Boxed; it is no longer required. #2446body::ResponseBody; is function is replaced by the newbody::AnyBodyenum. #2446
3.0.0-beta.12
Changed
- Update 
actix-serverto2.0.0-beta.9. #2442 
Removed
3.0.0-beta.11
Changed
- Updated rustls to v0.20. #2414
 - Minimum supported Rust version (MSRV) is now 1.52.
 
3.0.0-beta.10
Changed
ContentEncodingis now marked#[non_exhaustive]. #2377- Minimum supported Rust version (MSRV) is now 1.51.
 
Fixed
- Remove slice creation pointing to potential uninitialized data on h1 encoder. #2364
 - Remove 
Into<Error>bound onEncoderbody types. #2375 - Fix quality parse error in Accept-Encoding header. #2344
 
3.0.0-beta.9
Fixed
- Potential HTTP request smuggling vulnerabilities. RUSTSEC-2021-0081
 
3.0.0-beta.8
Changed
- Change compression algorithm features flags. #2250
 
Removed
downcastanddowncast_get_type_idmacros. #2291
3.0.0-beta.7
Added
- Alias 
body::Bodyasbody::AnyBody. #2215 BoxAnyBody: a boxed message body with boxed errors. #2183- Re-export 
httpcrate'sErrortype aserror::HttpError. #2171 - Re-export 
StatusCode,Method,VersionandUriat the crate root. #2171 - Re-export 
ContentEncodingandConnectionTypeat the crate root. #2171 Response::into_bodythat consumes response and returns body type. #2201impl DefaultforResponse. #2201- Add zstd support for 
ContentEncoding. #2244 
Changed
- The 
MessageBodytrait now has an associatedErrortype. #2183 - All error trait bounds in server service builders have changed from 
Into<Error>toInto<Response<AnyBody>>. #2253 - All error trait bounds in message body and stream impls changed from 
Into<Error>toInto<Box<dyn std::error::Error>>. #2253 - Places in 
ResponsewhereResponseBody<B>was received or returned now simply useB. #2201 headermod is now public. #2171urimod is now public. #2171- Update 
language-tagsto0.3. - Reduce the level from 
errortodebugfor the log line that is emitted when a500 Internal Server Erroris built usingHttpResponse::from_error. #2201 ResponseBuilder::message_bodynow returns aResult. #2201- Remove 
Unpinbound onResponseBuilder::streaming. #2253 HttpServer::{listen_rustls(), bind_rustls()}now honor the ALPN protocols in the configuration parameter. [#2226]
Removed
- Stop re-exporting 
httpcrate'sHeaderMaptypes in addition to ours. #2171 - Down-casting for 
MessageBodytypes. #2183 error::Resultalias. #2201- Error field from 
ResponseandResponse::error. #2205 impl FutureforResponse. #2201Response::take_bodyand oldResponse::into_bodymethod that casted body type. #2201InternalErrorand all the error types it constructed. #2215- Conversion (
impl Into) ofResponse<Body>andResponseBuildertoError. #2215 
3.0.0-beta.6
Added
impl<T: MessageBody> MessageBody for Pin<Box<T>>. #2152Response::{ok, bad_request, not_found, internal_server_error}. #2159- Helper 
body::to_bytesfor async collecting message body into Bytes. #2158 
Changed
- The type parameter of 
Responseno longer has a default. #2152 - The 
Messagevariant ofbody::Bodyis nowPin<Box<dyn MessageBody>>. #2152 BodyStreamandSizedStreamare no longer restricted to Unpin types. #2152- Error enum types are marked 
#[non_exhaustive]. #2161 
Removed
cookiesfeature flag. #2065- Top-level 
cookiesmod (re-export). #2065 HttpMessagetrait loses thecookiesandcookiemethods. #2065impl ResponseError for CookieParseError. #2065- Deprecated methods on 
ResponseBuilder:if_true,if_some. #2148 ResponseBuilder::json. #2148ResponseBuilder::{set_header, header}. #2148impl From<serde_json::Value> for Body. #2148Response::build_from. #2159- Most of the status code builders on 
Response. #2159 
3.0.0-beta.5
Added
client::Connector::handshake_timeoutmethod for customizing TLS connection handshake timeout. #2081client::ConnectorServiceasclient::Connector::finishmethod's return type #2081client::ConnectionIotrait alias #2081
Changed
client::Connectortype now only have one generic type foractix_service::Service. #2063
Removed
- Common typed HTTP headers were moved to actix-web. [2094]
 ResponseErrorimpl foractix_utils::timeout::TimeoutError. #2127
3.0.0-beta.4
Changed
- Feature 
cookiesis now optional and disabled by default. #1981 ws::hash_keynow returns array. #2035ResponseBuilder::jsonnow takesimpl Serialize. #2052
Removed
- Re-export of 
futures_channel::oneshot::Canceledis removed fromerrormod. #1994 ResponseErrorimpl forfutures_channel::oneshot::Canceledis removed. #1994
3.0.0-beta.3
- No notable changes.
 
3.0.0-beta.2
Added
TryIntoHeaderPairtrait that allows using typed and untyped headers in the same methods. #1869ResponseBuilder::insert_headermethod which allows using typed headers. #1869ResponseBuilder::append_headermethod which allows using typed headers. #1869TestRequest::insert_headermethod which allows using typed headers. #1869ContentEncodingimplements all necessary header traits. #1912HeaderMap::len_keyshas the behavior of the oldlenmethod. #1964HeaderMap::drainas an efficient draining iterator. #1964- Implement 
IntoIteratorfor ownedHeaderMap. #1964 trust-dnsoptional feature to enabletrust-dns-resolveras client dns resolver. #1969
Changed
ResponseBuilder::content_typenow takes animpl TryIntoHeaderValueto support using typedmimetypes. #1894- Renamed 
TryIntoHeaderValue::{try_into => try_into_value}to avoid ambiguity with stdTryIntotrait. #1894 Extensions::insertreturns Option of replaced item. #1904- Remove 
HttpResponseBuilder::json2(). #1903 - Enable 
HttpResponseBuilder::json()to receive data by value and reference. #1903 client::error::ConnectErrorResolver variant containsBox<dyn std::error::Error>type. #1905client::ConnectorConfigdefault timeout changed to 5 seconds. #1905- Simplify 
BlockingErrortype to a unit struct. It's now only triggered when blocking thread pool is dead. #1957 HeaderMap::lennow returns number of values instead of number of keys. #1964HeaderMap::insertnow returns iterator of removed values. #1964HeaderMap::removenow returns iterator of removed values. #1964
Removed
ResponseBuilder::set; useResponseBuilder::insert_header. #1869ResponseBuilder::set_header; useResponseBuilder::insert_header. #1869ResponseBuilder::header; useResponseBuilder::append_header. #1869TestRequest::with_hdr; useTestRequest::default().insert_header(). #1869TestRequest::with_header; useTestRequest::default().insert_header(). #1869actorsoptional feature. #1969ResponseErrorimpl foractix::MailboxError. #1969
Documentation
- Vastly improve docs and add examples for 
HeaderMap. #1964 
3.0.0-beta.1
Added
- Add 
Http3toProtocolenum for future compatibility and also mark#[non_exhaustive]. 
Changed
- Update 
actix-*dependencies to tokio1.0based versions. #1813 - Bumped 
randto0.8. - Update 
bytesto1.0. #1813 - Update 
h2to0.3. #1813 - The 
ws::Message::Textenum variant now contains abytestring::ByteString. #1864 
Removed
- Deprecated 
on_connectmethods have been removed. Prefer the newon_connect_exttechnique. #1857 - Remove 
ResponseErrorimpl foractix::actors::resolver::ResolverErrordue to deprecate of resolver actor. #1813 - Remove 
ConnectError::SslHandshakeErrorand re-export ofHandshakeError. due to the removal of this type fromtokio-opensslcrate. openssl handshake error would return asConnectError::SslError. #1813 - Remove 
actix-threadpooldependency. Useactix_rt::task::spawn_blocking. Due to this changeactix_threadpool::BlockingErrortype is moved intoactix_http::errormodule. #1878 
2.2.2
Changed
- Migrate to 
brotlicrate. ad7e3c06 
2.2.1
Fixed
- Potential HTTP request smuggling vulnerabilities. RUSTSEC-2021-0081
 
2.2.0
Added
- HttpResponse builders for 1xx status codes. #1768
 Accept::mime_precedenceandAccept::mime_preference. #1793TryFrom<u16>andTryFrom<f32>forhttp::header::Quality. #1797
Fixed
- Started dropping 
transfer-encoding: chunkedandContent-Lengthfor 1XX and 204 responses. #1767 
Changed
- Upgrade 
serde_urlencodedto0.7. #1773 
2.1.0
Added
- Added more flexible 
on_connect_extmethods for on-connect handling. #1754 
Changed
- Upgrade 
base64to0.13. #1744 - Upgrade 
pin-projectto1.0. #1733 - Deprecate 
ResponseBuilder::{if_some, if_true}. #1760 
2.0.0
- No significant changes from 
2.0.0-beta.4. 
2.0.0-beta.4
Changed
- Update actix-codec and actix-utils dependencies.
 - Update actix-connect and actix-tls dependencies.
 
2.0.0-beta.3
Fixed
- Memory leak of 
client::pool::ConnectorPoolSupport. #1626 
2.0.0-beta.2
Fixed
- Potential UB in h1 decoder using uninitialized memory. #1614
 
Changed
- Fix illegal chunked encoding. #1615
 
2.0.0-beta.1
Changed
- Migrate cookie handling to 
cookiecrate. #1558 - Update 
sha-1to 0.9. #1586 - Fix leak in client pool. #1580
 - MSRV is now 1.41.1.
 
2.0.0-alpha.4
Changed
- Bump minimum supported Rust version to 1.40
 - content_length function is removed, and you can set Content-Length by calling no_chunking function #1439
 BodySize::Sized64variant has been removed.BodySize::Sizednow receives au64instead of ausize.- Update 
base64dependency to 0.12 
Fixed
- Support parsing of 
SameSite=None#1503 
2.0.0-alpha.3
Fixed
- Correct spelling of ConnectError::Unresolved #1487
 - Fix a mistake in the encoding of websocket continuation messages wherein Item::FirstText and Item::FirstBinary are each encoded as the other.
 
Changed
- Implement 
std::error::Errorfor our custom errors #1422 - Remove 
failuresupport forResponseErrorsince that crate will be deprecated in the near future. 
2.0.0-alpha.2
Changed
- Update 
actix-connectandactix-tlsdependency to 2.0.0-alpha.1. #1395 - Change default initial window size and connection window size for HTTP2 to 2MB and 1MB respectively to improve download speed for awc when downloading large objects. #1394
 - client::Connector accepts initial_window_size and initial_connection_window_size HTTP2 configuration. #1394
 - client::Connector allowing to set max_http_version to limit HTTP version to be used. #1394
 
2.0.0-alpha.1
Changed
- Update the 
timedependency to 0.2.7. - Moved actors messages support from actix crate, enabled with feature 
actors. - Breaking change: trait MessageBody requires Unpin and accepting 
Pin<&mut Self>instead of&mut selfin the poll_next(). - MessageBody is not implemented for &'static [u8] anymore.
 
Fixed
- Allow 
SameSite=Nonecookies to be sent in a response. 
1.0.1
Fixed
- Poll upgrade service's readiness from HTTP service handlers
 - Replace brotli with brotli2 #1224
 
1.0.0
Added
- Add websockets continuation frame support
 
Changed
- Replace 
flate2-xxxfeatures withcompress 
1.0.0-alpha.5
Fixed
- Check 
Upgradeservice readiness before calling it - Fix buffer remaining capacity calculation
 
Changed
- Websockets: Ping and Pong should have binary data #1049
 
1.0.0-alpha.4
Added
- Add impl ResponseBuilder for Error
 
Changed
- Use rust based brotli compression library
 
1.0.0-alpha.3
Changed
- Migrate to tokio 0.2
 - Migrate to 
std::future 
0.2.11
Added
- Add support for serde_json::Value to be passed as argument to ResponseBuilder.body()
 - Add an additional 
filename*param in theContent-Dispositionheader ofactix_files::NamedFileto be more compatible. (#1151) - Allow to use 
std::convert::Infallibleasactix_http::error::Error 
Fixed
- To be compatible with non-English error responses, 
ResponseErrorrendered withtext/plain; charset=utf-8header [#1118] 
0.2.10
Added
- Add support for sending HTTP requests with 
Rc<RequestHead>in addition to sending HTTP requests withRequestHead 
Fixed
- h2 will use error response #1080
 - on_connect result isn't added to request extensions for http2 requests #1009
 
0.2.9
Changed
- Dropped the 
byteorder-dependency in favor ofstdlib-implementation - Update percent-encoding to 2.1
 - Update serde_urlencoded to 0.6.1
 
Fixed
- Fixed a panic in the HTTP2 handshake in client HTTP requests (#1031)
 
0.2.8
Added
- Add 
rustlssupport - Add 
Cloneimpl forHeaderMap 
Fixed
- awc client panic #1016
 - Invalid response with compression middleware enabled, but compression-related features disabled #997
 
0.2.7
Added
- Add support for downcasting response errors #986
 
0.2.6
Changed
- Replace 
ClonableServicewith local copy - Upgrade 
randdependency version to 0.7 
0.2.5
Added
- Add 
on-connectcallback,HttpServiceBuilder::on_connect()#946 
Changed
- Use 
encoding_rscrate instead of unmaintainedencodingcrate - Add 
CopyandCloneimpls forws::Codec 
0.2.4
Fixed
- Do not compress NoContent (204) responses #918
 
0.2.3
Added
- Debug impl for ResponseBuilder
 - From SizedStream and BodyStream for Body
 
Changed
- SizedStream uses u64
 
0.2.2
Fixed
- Parse incoming stream before closing stream on disconnect #868
 
0.2.1
Fixed
- Handle socket read disconnect
 
0.2.0
Changed
- Update actix-service to 0.4
 - Expect and upgrade services accept 
ServerConfigconfig. 
Deleted
OneRequestservice
0.1.5
Fixed
- Clean up response extensions in response pool #817
 
0.1.4
Added
- Allow to render h1 request headers in 
Camel-Case 
Fixed
- Read until eof for http/1.0 responses #771
 
0.1.3
Fixed
- Fix http client pool management
 - Fix http client wait queue management #794
 
0.1.2
Fixed
- Fix BorrowMutError panic in client connector #793
 
0.1.1
Changed
- Cookie::max_age() accepts value in seconds
 - Cookie::max_age_time() accepts value in time::Duration
 - Allow to specify server address for client connector
 
0.1.0
Added
- Expose peer addr via 
Request::peer_addr()andRequestHead::peer_addr 
Changed
actix_http::encodingalways available- use trust-dns-resolver 0.11.0
 
0.1.0-alpha.5
Added
- Allow to use custom service for upgrade requests
 - Added 
h1::SendResponsefuture. 
Changed
- MessageBody::length() renamed to MessageBody::size() for consistency
 - ws handshake verification functions take RequestHead instead of Request
 
0.1.0-alpha.4
Added
- Allow to use custom 
Expecthandler - Add minimal 
std::error::Errorimpl forError 
Changed
- Export IntoHeaderValue
 - Render error and return as response body
 - Use thread pool for response body compression
 
Deleted
- Removed PayloadBuffer
 
0.1.0-alpha.3
Added
- Warn when an unsealed private cookie isn't valid UTF-8
 
Fixed
- Rust 1.31.0 compatibility
 - Preallocate read buffer for h1 codec
 - Detect socket disconnection during protocol selection
 
0.1.0-alpha.2
Added
- Added ws::Message::Nop, no-op websockets message
 
Changed
- Do not use thread pool for decompression if chunk size is smaller than 2048.
 
0.1.0-alpha.1
- Initial impl