mirror of https://github.com/fafhrd91/actix-web
update changelog
This commit is contained in:
parent
2dcf5ebf58
commit
0002eed673
|
@ -12,15 +12,22 @@
|
|||
`ServiceRequest::from_request` would not fail and no payload would be generated [#1893]
|
||||
* Our `Either` type now uses `Left`/`Right` variants (instead of `A`/`B`) [#1894]
|
||||
|
||||
### Fixed
|
||||
* Multiple calls `App::data` with the same type now keeps the latest call's data. [#1906]
|
||||
|
||||
### Removed
|
||||
* Public field of `web::Path` has been made private. [#1894]
|
||||
* Public field of `web::Query` has been made private. [#1894]
|
||||
* `TestRequest::with_header`; use `TestRequest::default().insert_header()`. [#1869]
|
||||
* `AppService::set_service_data`; for custom HTTP service factories adding application data, use the
|
||||
layered data model by calling `ServiceRequest::add_data_container` when handling
|
||||
requests instead. [#1906]
|
||||
|
||||
[#1891]: https://github.com/actix/actix-web/pull/1891
|
||||
[#1893]: https://github.com/actix/actix-web/pull/1893
|
||||
[#1894]: https://github.com/actix/actix-web/pull/1894
|
||||
[#1869]: https://github.com/actix/actix-web/pull/1869
|
||||
[#1906]: https://github.com/actix/actix-web/pull/1906
|
||||
|
||||
|
||||
## 4.0.0-beta.1 - 2021-01-07
|
||||
|
|
|
@ -231,8 +231,10 @@ impl ServiceRequest {
|
|||
self.payload = payload;
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
/// Add app data container to request's resolution set.
|
||||
/// Add data container to request's resolution set.
|
||||
///
|
||||
/// In middleware, prefer [`extensions_mut`](ServiceRequest::extensions_mut) for request-local
|
||||
/// data since it is assumed that the same app data is presented for every request.
|
||||
pub fn add_data_container(&mut self, extensions: Rc<Extensions>) {
|
||||
Rc::get_mut(&mut (self.req).inner)
|
||||
.unwrap()
|
||||
|
|
Loading…
Reference in New Issue