1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-11-20 08:31:09 +00:00

Add actix-http support for actix error messages (#1379)

* Moved actix-http for actix from actix crate

* remove resolver feature

* renamed actix feature to actor

* fixed doc attr for actors, add documentation
This commit is contained in:
Maxim Vorobjov 2020-02-27 02:34:49 +02:00 committed by GitHub
parent 71c4bd1b30
commit 48ef4d7a26
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 1 deletions

View file

@ -3,6 +3,8 @@
* 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`
## 2.0.0

View file

@ -6,6 +6,8 @@
* Update the `time` dependency to 0.2.7
* Moved actors messages support from actix crate, enabled with feature `actors`.
### Fixed
* Allow `SameSite=None` cookies to be sent in a response.

View file

@ -15,7 +15,7 @@ license = "MIT/Apache-2.0"
edition = "2018"
[package.metadata.docs.rs]
features = ["openssl", "rustls", "failure", "compress", "secure-cookies"]
features = ["openssl", "rustls", "failure", "compress", "secure-cookies","actors"]
[lib]
name = "actix_http"
@ -39,6 +39,9 @@ failure = ["fail-ure"]
# support for secure cookies
secure-cookies = ["ring"]
# support for actix Actor messages
actors = ["actix"]
[dependencies]
actix-service = "1.0.1"
actix-codec = "0.2.0"
@ -47,6 +50,7 @@ actix-utils = "1.0.3"
actix-rt = "1.0.0"
actix-threadpool = "0.3.1"
actix-tls = { version = "1.0.0", optional = true }
actix = { version = "0.10.0-alpha.1", optional = true }
base64 = "0.11"
bitflags = "1.2"

View file

@ -951,6 +951,16 @@ where
/// Compatibility for `failure::Error`
impl ResponseError for fail_ure::Error {}
#[cfg(feature = "actors")]
/// `InternalServerError` for `actix::MailboxError`
/// This is supported on feature=`actors` only
impl ResponseError for actix::MailboxError {}
#[cfg(feature = "actors")]
/// `InternalServerError` for `actix::ResolverError`
/// This is supported on feature=`actors` only
impl ResponseError for actix::actors::resolver::ResolverError {}
#[cfg(test)]
mod tests {
use super::*;