mirror of https://github.com/fafhrd91/actix-web
update changelog
This commit is contained in:
parent
a1558066ea
commit
8f947e3e14
|
@ -5,9 +5,17 @@
|
|||
* `HttpServer::worker_max_blocking_threads` for setting block thread pool. [#2200]
|
||||
|
||||
### Changed
|
||||
* `ServiceResponse::error_response` now uses body type of `Body`. [#2201]
|
||||
* `ServiceResponse::checked_expr` now returns a `Result`. [#2201]
|
||||
* Update `language-tags` to `0.3`.
|
||||
* `ServiceResponse::take_body`. [#2201]
|
||||
* `ServiceResponse::map_body` closure receives and returns `B` instead of `ResponseBody<B>` types. [#2201]
|
||||
|
||||
### Removed
|
||||
* `HttpResponse::take_body` and old `HttpResponse::into_body` method that casted body type. [#2201]
|
||||
|
||||
[#2200]: https://github.com/actix/actix-web/pull/2200
|
||||
[#2201]: https://github.com/actix/actix-web/pull/2201
|
||||
|
||||
|
||||
## 4.0.0-beta.6 - 2021-04-17
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
* Re-export `http` crate's `Error` type as `error::HttpError`. [#2171]
|
||||
* Re-export `StatusCode`, `Method`, `Version` and `Uri` at the crate root. [#2171]
|
||||
* Re-export `ContentEncoding` and `ConnectionType` at the crate root. [#2171]
|
||||
* `Response::into_body` that consumes response and returns body type. [#2201]
|
||||
* `impl Default` for `Response`. [#2201]
|
||||
|
||||
### Changed
|
||||
* The `MessageBody` trait now has an associated `Error` type. [#2183]
|
||||
|
@ -13,13 +15,15 @@
|
|||
* `header` mod is now public. [#2171]
|
||||
* `uri` mod is now public. [#2171]
|
||||
* Update `language-tags` to `0.3`.
|
||||
* Reduce the level from `error` to `debug` for the log line that is emitted when a `500 Internal Server Error` is built using `HttpResponse::from_error`. [#2196]
|
||||
* Reduce the level from `error` to `debug` for the log line that is emitted when a `500 Internal Server Error` is built using `HttpResponse::from_error`. [#2201]
|
||||
* `ResponseBuilder::message_body` now returns a `Result`. [#2201]
|
||||
|
||||
### Removed
|
||||
* Stop re-exporting `http` crate's `HeaderMap` types in addition to ours. [#2171]
|
||||
* Down-casting for `MessageBody` types. [#2183]
|
||||
* `error::Result` alias. [#2201]
|
||||
* `impl Future` for `Response`. [#2201]
|
||||
* `Response::take_body` and old `Response::into_body` method that casted body type. [#2201]
|
||||
|
||||
[#2171]: https://github.com/actix/actix-web/pull/2171
|
||||
[#2183]: https://github.com/actix/actix-web/pull/2183
|
||||
|
|
|
@ -166,8 +166,7 @@ impl AppInitServiceState {
|
|||
Rc::new(AppInitServiceState {
|
||||
rmap,
|
||||
config,
|
||||
// TODO: AppConfig can be used to pass user defined HttpRequestPool
|
||||
// capacity.
|
||||
// TODO: AppConfig can be used to pass user defined HttpRequestPool capacity.
|
||||
pool: HttpRequestPool::default(),
|
||||
})
|
||||
}
|
||||
|
|
|
@ -229,11 +229,6 @@ impl<B> HttpResponse<B> {
|
|||
}
|
||||
}
|
||||
|
||||
// /// Extract response body
|
||||
// pub fn take_body(&mut self) -> ResponseBody<B> {
|
||||
// self.res.take_body()
|
||||
// }
|
||||
|
||||
/// Extract response body
|
||||
pub fn into_body(self) -> B {
|
||||
self.res.into_body()
|
||||
|
|
|
@ -403,14 +403,8 @@ impl<B> ServiceResponse<B> {
|
|||
F: FnOnce(&mut Self) -> Result<(), E>,
|
||||
E: Into<Error>,
|
||||
{
|
||||
match f(&mut self) {
|
||||
Ok(_) => Ok(self),
|
||||
Err(err) => {
|
||||
Err(err.into())
|
||||
// let res = HttpResponse::from_error(err.into());
|
||||
// ServiceResponse::new(self.request, res.into_body())
|
||||
}
|
||||
}
|
||||
f(&mut self).map_err(Into::into)?;
|
||||
Ok(self)
|
||||
}
|
||||
|
||||
/// Extract response body
|
||||
|
|
Loading…
Reference in New Issue