mirror of
https://github.com/actix/actix-web.git
synced 2024-11-10 19:01:05 +00:00
9e7a6fe57b
* add body::to_body_limit * rename to_bytes_limited
49 KiB
49 KiB
Changes
Unreleased - 2023-xx-xx
Added
- Add
body::to_body_limit()
function. - Add
body::BodyLimitExceeded
error type.
3.3.1 - 2023-03-02
Fixed
- Use correct
http
version requirement to ensure support for constHeaderName
definitions.
3.3.0 - 2023-01-21
Added
- Implement
MessageBody
forCow<'static, str>
andCow<'static, [u8]>
. #2959 - Implement
MessageBody
for&mut B
whereB: MessageBody + Unpin
. #2868 - Implement
MessageBody
forPin<B>
whereB::Target: MessageBody
. #2868 - Automatic h2c detection via new service finalizer
HttpService::tcp_auto_h2c()
. #2957 HeaderMap::retain()
. #2955- Header name constants in
header
module. #2956 #2968CACHE_STATUS
CDN_CACHE_CONTROL
CROSS_ORIGIN_EMBEDDER_POLICY
CROSS_ORIGIN_OPENER_POLICY
PERMISSIONS_POLICY
X_FORWARDED_FOR
X_FORWARDED_HOST
X_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 - 2022-09-11
Changed
- Minimum supported Rust version (MSRV) is now 1.59 due to transitive
time
dependency.
Fixed
- Avoid possibility of dispatcher getting stuck while back-pressuring I/O. #2369
3.2.1 - 2022-07-02
Fixed
- Fix parsing ambiguity in Transfer-Encoding and Content-Length headers for HTTP/1.0 requests. #2794
3.2.0 - 2022-06-30
Changed
- Minimum supported Rust version (MSRV) is now 1.57 due to transitive
time
dependency.
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 - 2022-06-11
Changed
- Minimum supported Rust version (MSRV) is now 1.56 due to transitive
hashbrown
dependency.
Fixed
- Revert broken fix in #2624 that caused erroneous 500 error responses. Temporarily re-introduces #2357 bug. #2779
3.0.4 - 2022-03-09
Fixed
- Document on docs.rs with
ws
feature enabled.
3.0.3 - 2022-03-08
Fixed
- Allow spaces between header name and colon when parsing responses. #2684
3.0.2 - 2022-03-05
Fixed
- Fix encoding camel-case header names with more than one hyphen. #2683
3.0.1 - 2022-03-04
- Fix panic in H1 dispatcher when pipelining is used with keep-alive. #2678
3.0.0 - 2022-02-25
Dependencies
- Updated
actix-*
to Tokio v1-based versions. #1813 - Updated
bytes
to1.0
. #1813 - Updated
h2
to0.3
. #1813 - Updated
rustls
to0.20.0
. #2414 - Updated
language-tags
to0.3
. - Updated
tokio
to1
.
Added
- Crate Features:
- Functions:
body::to_bytes
for 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 oldlen
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. #1869
- Implementations:
- Implement
Clone for ws::HandshakeError
. #2468 - Implement
Clone
forbody::AnyBody<S> where S: Clone
. #2448 - Implement
Clone
forRequestHead
. #2487 - Implement
Clone
forResponseHead
. #2585 - Implement
Copy
forQualityItem<T> where T: Copy
. #2501 - Implement
Default
forContentEncoding
. #1912 - Implement
Default
forHttpServiceBuilder
. #2611 - Implement
Default
forKeepAlive
. #2611 - Implement
Default
forResponse
. #2201 - Implement
Default
forws::Codec
. #1920 - Implement
Display
forheader::Quality
. #2486 - Implement
Eq
forheader::ContentEncoding
. #2501 - Implement
ExactSizeIterator
andFusedIterator
for allHeaderMap
iterators. #2470 - Implement
From<Duration>
forKeepAlive
. #2611 - Implement
From<Option<Duration>>
forKeepAlive
. #2611 - Implement
From<Vec<u8>>
forResponse<Vec<u8>>
. #2625 - Implement
FromStr
forContentEncoding
. #1912 - Implement
Header
forContentEncoding
. #1912 - Implement
IntoHeaderValue
forContentEncoding
. #1912 - Implement
IntoIterator
forHeaderMap
. #1964 - Implement
MessageBody
forbytestring::ByteString
. #2468 - Implement
MessageBody
forPin<Box<T>> where T: MessageBody
. #2152
- Implement
- Misc:
- Re-export
StatusCode
,Method
,Version
andUri
at the crate root. #2171 - Re-export
ContentEncoding
andConnectionType
at the crate root. #2171 Quality::ZERO
associated constant equivalent toq=0
. #2501header::Quality::{MAX, MIN}
associated constants equivalent toq=1
andq=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::Codec
to prevent subtle bugs. #1920
- Re-export
Changed
- Traits:
- Types:
Protocol
enum is now marked#[non_exhaustive]
.error::DispatcherError
enum is now marked#[non_exhaustive]
. #2624ContentEncoding
is now marked#[non_exhaustive]
. #2377- Error enums are marked
#[non_exhaustive]
. #2161 - Rename
PayloadStream
toBoxedPayloadStream
. #2545 - The body type parameter of
Response
no 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 stdTryInto
trait. #1894 - Deadline methods in
ServiceConfig
now returnstd::time::Instant
s instead of Tokio's wrapper type. #2611 - Places in
Response
whereResponseBody<B>
was received or returned now simply useB
. #2201 encoding::Encoder::response
now returnsAnyBody<Encoder<B>>
. #2448Extensions::insert
returns replaced item. #1904HeaderMap::get_all
now returns astd::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 returnsResponse<EitherBody<B>>
. #2468ResponseBuilder::content_type
now takes animpl TryIntoHeaderValue
to support using typedmime
types. #1894ResponseBuilder::finish()
now returnsResponse<EitherBody<()>>
. #2468ResponseBuilder::json
now takesimpl Serialize
. #2052ResponseBuilder::message_body
now returns aResult
. #2201∑ServiceConfig::keep_alive
now returns aKeepAlive
. #2611ws::hash_key
now returns array. #2035
- Rename
- Trait Implementations:
- Implementation of
Stream
forPayload
no longer requires theStream
variant beUnpin
. #2545 - Implementation of
Future
forh1::SendResponse
no longer requires the body type beUnpin
. #2545 - Implementation of
Stream
forencoding::Decoder
no longer requires the stream type beUnpin
. #2545 - Implementation of
From
for error types now return aResponse<BoxBody>
. #2468
- Implementation of
- Misc:
header
module is now public. #2171uri
module 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::GetAll
iterator to be same as insertion order. #2467 - Connection data set through the
on_connect_ext
callbacks is now accessible only from the newRequest::conn_data()
method. #2491 - Brotli (de)compression support is now provided by the
brotli
crate. #2538 - Minimum supported Rust version (MSRV) is now 1.54.
Fixed
- A
Vary
header 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
'sIdentity
variant 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 onEncoder
body types. #2375 - Remove unnecessary
Unpin
bound onResponseBuilder::streaming
. #2253 BodyStream
andSizedStream
are no longer restricted toUnpin
types. #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::qitem
helper. Replaced withheader::QualityItem::max
. #2486
- Types:
body::Body
; replaced withEitherBody
andBoxBody
. #2468body::ResponseBody
. #2446ConnectError::SslHandshakeError
and re-export ofHandshakeError
. Due to the removal of this type fromtokio-openssl
crate. OpenSSL handshake error now returnsConnectError::SslError
. #1813error::Canceled
re-export. #1994error::Result
type alias. #2201error::BlockingError
#2660InternalError
and 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
http
crate'sHeaderMap
types in addition to ours. #2171
- Enum Variants:
- Methods:
ContentEncoding::is_compression()
. #2501h1::Payload::readany()
. #2545HttpMessage::cookie[s]()
trait methods. #2065HttpServiceBuilder::new()
; usedefault
instead. #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
Copy
forws::Codec
. #1920 - Implementation of
From<Option<usize>> for KeepAlive
; useDuration
s instead. #2611 - Implementation of
From<serde_json::Value>
forBody
. #2148 - Implementation of
From<usize> for KeepAlive
; useDuration
s instead. #2611 - Implementation of
Future
forResponse
. #2201 - Implementation of
Future
forResponseBuilder
. #2468 - Implementation of
Into<Error>
forResponse<Body>
. #2215 - Implementation of
Into<Error>
forResponseBuilder
. #2215 - Implementation of
ResponseError
foractix_utils::timeout::TimeoutError
. #2127 - Implementation of
ResponseError
forCookieParseError
. #2065 - Implementation of
TryFrom<u16>
forheader::Quality
. #2486
- Implementation of
- Misc:
http
module; most everything it contained is exported at the crate root. #2488cookies
module (re-export). #2065client
module. Connector types now live inawc
. #2425error
field fromResponse
. #2205downcast
anddowncast_get_type_id
macros. #2291- Down-casting for
MessageBody
types; use standardAny
trait. #2183
3.0.0 Pre-Releases
3.0.0-rc.4 - 2022-02-22
Fixed
- Fix h1 dispatcher panic. 1ce58ecb
3.0.0-rc.3 - 2022-02-16
- No significant changes since
3.0.0-rc.2
.
3.0.0-rc.2 - 2022-02-08
Added
- Implement
From<Vec<u8>>
forResponse<Vec<u8>>
. #2625
Changed
error::DispatcherError
enum 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 - 2022-01-31
Added
- Implement
Default
forKeepAlive
. #2611 - Implement
From<Duration>
forKeepAlive
. #2611 - Implement
From<Option<Duration>>
forKeepAlive
. #2611 - Implement
Default
forHttpServiceBuilder
. #2611 - Crate
ws
feature flag, disabled by default. #2618 - Crate
http2
feature 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
ServiceConfig
now returnstd::time::Instant
s 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_alive
now 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
; useDuration
s instead. #2611impl From<Option<usize>> for KeepAlive
; useDuration
s instead. #2611HttpServiceBuilder::new
; usedefault
instead. #2611
3.0.0-beta.19 - 2022-01-21
Added
- Response headers can be sent as camel case using
res.head_mut().set_camel_case_headers(true)
. #2587 ResponseHead
now implementsClone
. #2585
Changed
- Brotli (de)compression support is now provided by the
brotli
crate. #2538
Removed
3.0.0-beta.18 - 2022-01-04
Added
impl Eq
forheader::ContentEncoding
. #2501impl Copy
forQualityItem
whereT: Copy
. #2501Quality::ZERO
equivalent toq=0
. #2501QualityItem::zero
that usesQuality::ZERO
. #2501ContentEncoding::to_header_value()
. #2501
Changed
Quality::MIN
is now the smallest non-zero value. #2501QualityItem::min
semantics 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::Identity
can now be parsed from a string. #2501- A
Vary
header is now correctly sent along with compressed content. #2501
Removed
3.0.0-beta.17 - 2021-12-27
Changed
HeaderMap::get_all
now returns astd::slice::Iter
. #2527Payload
inner fields are now named. #2545impl Stream
forPayload
no longer requires theStream
variant beUnpin
. #2545impl Future
forh1::SendResponse
no longer requires the body type beUnpin
. #2545impl Stream
forencoding::Decoder
no longer requires the stream type beUnpin
. #2545- Rename
PayloadStream
toBoxedPayloadStream
. #2545
Removed
h1::Payload::readany
. #2545
3.0.0-beta.16 - 2021-12-17
Added
- New method on
MessageBody
trait,try_into_bytes
, with default implementation, for optimizations on body types that complete in exactly one poll. Replacesis_complete_body
andtake_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 - 2021-12-11
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::EitherBody
enum. #2468body::None
struct. #2468- Impl
MessageBody
forbytestring::ByteString
. #2468 impl Clone for ws::HandshakeError
. #2468#[must_use]
forws::Codec
to prevent subtle bugs. #1920impl Default
forws::Codec
. #1920header::QualityItem::{max, min}
. #2486header::Quality::{MAX, MIN}
. #2486impl Display
forheader::Quality
. #2486- Connection data set through the
on_connect_ext
callbacks is now accessible only from the newRequest::conn_data()
method. #2491 Request::take_conn_data()
. #2491Request::take_req_data()
. #2487impl Clone
forRequestHead
. #2487- New methods on
MessageBody
trait,is_complete_body
andtake_complete_body
, both with default implementations, for optimizations on body types that are done in exactly one poll/chunk. #2497 - New
boxed
method onMessageBody
trait for wrapping body type. #2520
Changed
- Rename
body::BoxBody::{from_body => new}
. #2468 - Body type for
Responses
returned fromResponse::{new, ok, etc...}
is nowBoxBody
. #2468 - The
Error
associated type onMessageBody
type now requiresimpl Error
(or similar). #2468 - Error types using in service builders now require
Into<Response<BoxBody>>
. #2468 From
implementations on error types now return aResponse<BoxBody>
. #2468ResponseBuilder::body(B)
now returnsResponse<EitherBody<B>>
. #2468ResponseBuilder::finish()
now returnsResponse<EitherBody<()>>
. #2468
Removed
ResponseBuilder::streaming
. #2468impl Future
forResponseBuilder
. #2468- Remove unnecessary
MessageBody
bound on types passed tobody::AnyBody::new
. #2468 - Move
body::AnyBody
toawc
. Replaced withEitherBody
andBoxBody
. #2468 impl Copy
forws::Codec
. #1920header::qitem
helper. Replaced withheader::QualityItem::max
. #2486impl TryFrom<u16>
forheader::Quality
. #2486http
module. Most everything it contained is exported at the crate root. #2488
3.0.0-beta.14 - 2021-11-30
Changed
- Guarantee ordering of
header::GetAll
iterator to be same as insertion order. #2467 - Expose
header::map
module. #2467 - Implement
ExactSizeIterator
andFusedIterator
for allHeaderMap
iterators. #2470 - Update
actix-tls
to3.0.0-rc.1
. #2474
3.0.0-beta.13 - 2021-11-22
Added
body::AnyBody::empty
for quickly creating an empty body. #2446body::AnyBody::none
for quickly creating a "none" body. #2456impl Clone
forbody::AnyBody<S> where S: Clone
. #2448body::AnyBody::into_boxed
for 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
AnyBody
to include a type parameter inBody
variant. Defaults toBoxBody
. #2448 Encoder::response
now returnsAnyBody<Encoder<B>>
. #2448
Removed
body::AnyBody::Empty
; an empty body can now only be represented as a zero-lengthBytes
variant. #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::AnyBody
enum. #2446
3.0.0-beta.12 - 2021-11-15
Changed
- Update
actix-server
to2.0.0-beta.9
. #2442
Removed
3.0.0-beta.11 - 2021-10-20
Changed
- Updated rustls to v0.20. #2414
- Minimum supported Rust version (MSRV) is now 1.52.
3.0.0-beta.10 - 2021-09-09
Changed
ContentEncoding
is 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 onEncoder
body types. #2375 - Fix quality parse error in Accept-Encoding header. #2344
3.0.0-beta.9 - 2021-08-09
Fixed
- Potential HTTP request smuggling vulnerabilities. RUSTSEC-2021-0081
3.0.0-beta.8 - 2021-06-26
Changed
- Change compression algorithm features flags. #2250
Removed
downcast
anddowncast_get_type_id
macros. #2291
3.0.0-beta.7 - 2021-06-17
Added
- Alias
body::Body
asbody::AnyBody
. #2215 BoxAnyBody
: a boxed message body with boxed errors. #2183- Re-export
http
crate'sError
type aserror::HttpError
. #2171 - Re-export
StatusCode
,Method
,Version
andUri
at the crate root. #2171 - Re-export
ContentEncoding
andConnectionType
at the crate root. #2171 Response::into_body
that consumes response and returns body type. #2201impl Default
forResponse
. #2201- Add zstd support for
ContentEncoding
. #2244
Changed
- The
MessageBody
trait now has an associatedError
type. #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
Response
whereResponseBody<B>
was received or returned now simply useB
. #2201 header
mod is now public. #2171uri
mod is now public. #2171- Update
language-tags
to0.3
. - Reduce the level from
error
todebug
for the log line that is emitted when a500 Internal Server Error
is built usingHttpResponse::from_error
. #2201 ResponseBuilder::message_body
now returns aResult
. #2201- Remove
Unpin
bound onResponseBuilder::streaming
. #2253 HttpServer::{listen_rustls(), bind_rustls()}
now honor the ALPN protocols in the configuration parameter. [#2226]
Removed
- Stop re-exporting
http
crate'sHeaderMap
types in addition to ours. #2171 - Down-casting for
MessageBody
types. #2183 error::Result
alias. #2201- Error field from
Response
andResponse::error
. #2205 impl Future
forResponse
. #2201Response::take_body
and oldResponse::into_body
method that casted body type. #2201InternalError
and all the error types it constructed. #2215- Conversion (
impl Into
) ofResponse<Body>
andResponseBuilder
toError
. #2215
3.0.0-beta.6 - 2021-04-17
Added
impl<T: MessageBody> MessageBody for Pin<Box<T>>
. #2152Response::{ok, bad_request, not_found, internal_server_error}
. #2159- Helper
body::to_bytes
for async collecting message body into Bytes. #2158
Changed
- The type parameter of
Response
no longer has a default. #2152 - The
Message
variant ofbody::Body
is nowPin<Box<dyn MessageBody>>
. #2152 BodyStream
andSizedStream
are no longer restricted to Unpin types. #2152- Error enum types are marked
#[non_exhaustive]
. #2161
Removed
cookies
feature flag. #2065- Top-level
cookies
mod (re-export). #2065 HttpMessage
trait loses thecookies
andcookie
methods. #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 - 2021-04-02
Added
client::Connector::handshake_timeout
method for customizing TLS connection handshake timeout. #2081client::ConnectorService
asclient::Connector::finish
method's return type #2081client::ConnectionIo
trait alias #2081
Changed
client::Connector
type now only have one generic type foractix_service::Service
. #2063
Removed
- Common typed HTTP headers were moved to actix-web. [2094]
ResponseError
impl foractix_utils::timeout::TimeoutError
. #2127
3.0.0-beta.4 - 2021-03-08
Changed
- Feature
cookies
is now optional and disabled by default. #1981 ws::hash_key
now returns array. #2035ResponseBuilder::json
now takesimpl Serialize
. #2052
Removed
- Re-export of
futures_channel::oneshot::Canceled
is removed fromerror
mod. #1994 ResponseError
impl forfutures_channel::oneshot::Canceled
is removed. #1994
3.0.0-beta.3 - 2021-02-10
- No notable changes.
3.0.0-beta.2 - 2021-02-10
Added
TryIntoHeaderPair
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 oldlen
method. #1964HeaderMap::drain
as an efficient draining iterator. #1964- Implement
IntoIterator
for ownedHeaderMap
. #1964 trust-dns
optional feature to enabletrust-dns-resolver
as client dns resolver. #1969
Changed
ResponseBuilder::content_type
now takes animpl TryIntoHeaderValue
to support using typedmime
types. #1894- Renamed
TryIntoHeaderValue::{try_into => try_into_value}
to avoid ambiguity with stdTryInto
trait. #1894 Extensions::insert
returns Option of replaced item. #1904- Remove
HttpResponseBuilder::json2()
. #1903 - Enable
HttpResponseBuilder::json()
to receive data by value and reference. #1903 client::error::ConnectError
Resolver variant containsBox<dyn std::error::Error>
type. #1905client::ConnectorConfig
default timeout changed to 5 seconds. #1905- Simplify
BlockingError
type to a unit struct. It's now only triggered when blocking thread pool is dead. #1957 HeaderMap::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. #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()
. #1869actors
optional feature. #1969ResponseError
impl foractix::MailboxError
. #1969
Documentation
- Vastly improve docs and add examples for
HeaderMap
. #1964
3.0.0-beta.1 - 2021-01-07
Added
- Add
Http3
toProtocol
enum for future compatibility and also mark#[non_exhaustive]
.
Changed
- Update
actix-*
dependencies to tokio1.0
based versions. #1813 - Bumped
rand
to0.8
. - Update
bytes
to1.0
. #1813 - Update
h2
to0.3
. #1813 - The
ws::Message::Text
enum variant now contains abytestring::ByteString
. #1864
Removed
- Deprecated
on_connect
methods have been removed. Prefer the newon_connect_ext
technique. #1857 - Remove
ResponseError
impl foractix::actors::resolver::ResolverError
due to deprecate of resolver actor. #1813 - Remove
ConnectError::SslHandshakeError
and re-export ofHandshakeError
. due to the removal of this type fromtokio-openssl
crate. openssl handshake error would return asConnectError::SslError
. #1813 - Remove
actix-threadpool
dependency. Useactix_rt::task::spawn_blocking
. Due to this changeactix_threadpool::BlockingError
type is moved intoactix_http::error
module. #1878
2.2.2 - 2022-01-21
Changed
- Migrate to
brotli
crate. ad7e3c06
2.2.1 - 2021-08-09
Fixed
- Potential HTTP request smuggling vulnerabilities. RUSTSEC-2021-0081
2.2.0 - 2020-11-25
Added
- HttpResponse builders for 1xx status codes. #1768
Accept::mime_precedence
andAccept::mime_preference
. #1793TryFrom<u16>
andTryFrom<f32>
forhttp::header::Quality
. #1797
Fixed
- Started dropping
transfer-encoding: chunked
andContent-Length
for 1XX and 204 responses. #1767
Changed
- Upgrade
serde_urlencoded
to0.7
. #1773
2.1.0 - 2020-10-30
Added
- Added more flexible
on_connect_ext
methods for on-connect handling. #1754
Changed
- Upgrade
base64
to0.13
. #1744 - Upgrade
pin-project
to1.0
. #1733 - Deprecate
ResponseBuilder::{if_some, if_true}
. #1760
2.0.0 - 2020-09-11
- No significant changes from
2.0.0-beta.4
.
2.0.0-beta.4 - 2020-09-09
Changed
- Update actix-codec and actix-utils dependencies.
- Update actix-connect and actix-tls dependencies.
2.0.0-beta.3 - 2020-08-14
Fixed
- Memory leak of
client::pool::ConnectorPoolSupport
. #1626
2.0.0-beta.2 - 2020-07-21
Fixed
- Potential UB in h1 decoder using uninitialized memory. #1614
Changed
- Fix illegal chunked encoding. #1615
2.0.0-beta.1 - 2020-07-11
Changed
- Migrate cookie handling to
cookie
crate. #1558 - Update
sha-1
to 0.9. #1586 - Fix leak in client pool. #1580
- MSRV is now 1.41.1.
2.0.0-alpha.4 - 2020-05-21
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::Sized64
variant has been removed.BodySize::Sized
now receives au64
instead of ausize
.- Update
base64
dependency to 0.12
Fixed
- Support parsing of
SameSite=None
#1503
2.0.0-alpha.3 - 2020-05-08
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::Error
for our custom errors #1422 - Remove
failure
support forResponseError
since that crate will be deprecated in the near future.
2.0.0-alpha.2 - 2020-03-07
Changed
- Update
actix-connect
andactix-tls
dependency 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 - 2020-02-27
Changed
- Update the
time
dependency 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 self
in the poll_next(). - MessageBody is not implemented for &'static [u8] anymore.
Fixed
- Allow
SameSite=None
cookies to be sent in a response.
1.0.1 - 2019-12-20
Fixed
- Poll upgrade service's readiness from HTTP service handlers
- Replace brotli with brotli2 #1224
1.0.0 - 2019-12-13
Added
- Add websockets continuation frame support
Changed
- Replace
flate2-xxx
features withcompress
1.0.0-alpha.5 - 2019-12-09
Fixed
- Check
Upgrade
service readiness before calling it - Fix buffer remaining capacity calculation
Changed
- Websockets: Ping and Pong should have binary data #1049
1.0.0-alpha.4 - 2019-12-08
Added
- Add impl ResponseBuilder for Error
Changed
- Use rust based brotli compression library
1.0.0-alpha.3 - 2019-12-07
Changed
- Migrate to tokio 0.2
- Migrate to
std::future
0.2.11 - 2019-11-06
Added
- Add support for serde_json::Value to be passed as argument to ResponseBuilder.body()
- Add an additional
filename*
param in theContent-Disposition
header ofactix_files::NamedFile
to be more compatible. (#1151) - Allow to use
std::convert::Infallible
asactix_http::error::Error
Fixed
- To be compatible with non-English error responses,
ResponseError
rendered withtext/plain; charset=utf-8
header [#1118]
0.2.10 - 2019-09-11
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 - 2019-08-13
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 - 2019-08-01
Added
- Add
rustls
support - Add
Clone
impl forHeaderMap
Fixed
- awc client panic #1016
- Invalid response with compression middleware enabled, but compression-related features disabled #997
0.2.7 - 2019-07-18
Added
- Add support for downcasting response errors #986
0.2.6 - 2019-07-17
Changed
- Replace
ClonableService
with local copy - Upgrade
rand
dependency version to 0.7
0.2.5 - 2019-06-28
Added
- Add
on-connect
callback,HttpServiceBuilder::on_connect()
#946
Changed
- Use
encoding_rs
crate instead of unmaintainedencoding
crate - Add
Copy
andClone
impls forws::Codec
0.2.4 - 2019-06-16
Fixed
- Do not compress NoContent (204) responses #918
0.2.3 - 2019-06-02
Added
- Debug impl for ResponseBuilder
- From SizedStream and BodyStream for Body
Changed
- SizedStream uses u64
0.2.2 - 2019-05-29
Fixed
- Parse incoming stream before closing stream on disconnect #868
0.2.1 - 2019-05-25
Fixed
- Handle socket read disconnect
0.2.0 - 2019-05-12
Changed
- Update actix-service to 0.4
- Expect and upgrade services accept
ServerConfig
config.
Deleted
OneRequest
service
0.1.5 - 2019-05-04
Fixed
- Clean up response extensions in response pool #817
0.1.4 - 2019-04-24
Added
- Allow to render h1 request headers in
Camel-Case
Fixed
- Read until eof for http/1.0 responses #771
0.1.3 - 2019-04-23
Fixed
- Fix http client pool management
- Fix http client wait queue management #794
0.1.2 - 2019-04-23
Fixed
- Fix BorrowMutError panic in client connector #793
0.1.1 - 2019-04-19
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 - 2019-04-16
Added
- Expose peer addr via
Request::peer_addr()
andRequestHead::peer_addr
Changed
actix_http::encoding
always available- use trust-dns-resolver 0.11.0
0.1.0-alpha.5 - 2019-04-12
Added
- Allow to use custom service for upgrade requests
- Added
h1::SendResponse
future.
Changed
- MessageBody::length() renamed to MessageBody::size() for consistency
- ws handshake verification functions take RequestHead instead of Request
0.1.0-alpha.4 - 2019-04-08
Added
- Allow to use custom
Expect
handler - Add minimal
std::error::Error
impl 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 - 2019-04-02
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 - 2019-03-29
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 - 2019-03-28
- Initial impl