1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2025-01-02 13:28:44 +00:00

update migration guide

closes #1680
This commit is contained in:
Rob Ede 2020-09-14 22:26:03 +01:00
parent 3fde3be3d8
commit 4b4c9d1b93
No known key found for this signature in database
GPG key ID: C2A3B36E841A91E6

View file

@ -3,12 +3,23 @@
## 3.0.0
* The return type for `ServiceRequest::app_data::<T>()` was changed from returning a `Data<T>` to
simply a `T`. To access a `Data<T>` use `ServiceRequest::app_data::<Data<T>>()`.
* Cookie handling has been offloaded to the `cookie` crate:
* `USERINFO_ENCODE_SET` is no longer exposed. Percent-encoding is still supported; check docs.
* Some types now require lifetime parameters.
* The time crate was updated to `v0.2`, a major breaking change to the time crate, which affects
any `actix-web` method previously expecting a time v0.1 input.
* Setting a cookie's SameSite property, explicitly, to `SameSite::None` will now
result in `SameSite=None` being sent with the response Set-Cookie header.
To create a cookie without a SameSite attribute, remove any calls setting same_site.
* actix-http support for Actors messages was moved to actix-http crate and is enabled
with feature `actors`
* content_length function is removed from actix-http.
You can set Content-Length by normally setting the response body or calling no_chunking function.