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 configuation 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