update ntex

This commit is contained in:
Nikolay Kim 2021-02-21 15:40:45 +06:00
parent 0c1b98a999
commit 5da65b7b30
8 changed files with 25 additions and 24 deletions

View file

@ -16,6 +16,6 @@ name = "ntex_cors"
path = "src/lib.rs"
[dependencies]
ntex = "0.1.24"
ntex = "0.2.0-b.14"
derive_more = "0.99.5"
futures = "0.3.5"

View file

@ -494,10 +494,12 @@ impl Cors {
if !slf.expose_hdrs.is_empty() {
cors.expose_hdrs = Some(
slf.expose_hdrs
HeaderValue::try_from(
&slf.expose_hdrs
.iter()
.fold(String::new(), |s, v| format!("{}, {}", s, v.as_str()))[2..]
.to_owned(),
.fold(String::new(), |s, v| format!("{}, {}", s, v.as_str()))[2..],
)
.unwrap(),
);
}
@ -517,7 +519,7 @@ struct Inner {
origins: AllOrSome<HashSet<String>>,
origins_str: Option<HeaderValue>,
headers: AllOrSome<HashSet<HeaderName>>,
expose_hdrs: Option<String>,
expose_hdrs: Option<HeaderValue>,
max_age: Option<usize>,
preflight: bool,
send_wildcard: bool,
@ -688,10 +690,7 @@ impl Inner {
};
if let Some(ref expose) = self.expose_hdrs {
headers.insert(
header::ACCESS_CONTROL_EXPOSE_HEADERS,
HeaderValue::try_from(expose.as_str()).unwrap(),
);
headers.insert(header::ACCESS_CONTROL_EXPOSE_HEADERS, expose.clone());
}
if self.supports_credentials {
headers.insert(

View file

@ -18,10 +18,10 @@ name = "ntex_files"
path = "src/lib.rs"
[dependencies]
ntex = "0.1.21"
ntex = "0.2.0-b.14"
bitflags = "1"
bytes = "0.5.4"
futures = "0.3.4"
bytes = "0.5.6"
futures = "0.3.12"
derive_more = "0.99.5"
hyperx = "1.0.0"
log = "0.4"
@ -31,4 +31,4 @@ percent-encoding = "2.1"
v_htmlescape = "0.4"
[dev-dependencies]
ntex = { version = "0.1.7", features=["openssl", "compress"] }
ntex = { version = "0.2.0-b.14", features=["openssl", "compress"] }

View file

@ -21,8 +21,8 @@ default = ["cookie-policy"]
cookie-policy = ["cookie/secure", "ntex/cookie"]
[dependencies]
ntex = "0.1.21"
futures = "0.3.4"
ntex = "0.2.0-b.14"
futures = "0.3.12"
serde = "1.0"
serde_json = "1.0"
cookie = "0.14.2"

View file

@ -59,8 +59,9 @@ use time::Duration;
use ntex::http::error::HttpError;
use ntex::http::header::{self, HeaderValue};
use ntex::http::{Extensions, HttpMessage, Payload};
use ntex::http::{HttpMessage, Payload};
use ntex::service::{Service, Transform};
use ntex::util::Extensions;
use ntex::web::dev::{WebRequest, WebResponse};
use ntex::web::{DefaultError, ErrorRenderer, FromRequest, HttpRequest, WebResponseError};

View file

@ -16,11 +16,11 @@ name = "ntex_multipart"
path = "src/lib.rs"
[dependencies]
ntex = "0.1.21"
bytes = "0.5.4"
ntex = "0.2.0-b.14"
bytes = "0.5.6"
derive_more = "0.99.5"
httparse = "1.3"
futures = "0.3.4"
futures = "0.3.12"
log = "0.4"
mime = "0.3"
twoway = "0.2"

View file

@ -22,11 +22,11 @@ default = ["cookie-session"]
cookie-session = ["cookie/secure", "ntex/cookie"]
[dependencies]
ntex = "0.1.21"
bytes = "0.5.4"
ntex = "0.2.0-b.14"
bytes = "0.5.6"
cookie = "0.14.2"
derive_more = "0.99.5"
futures = "0.3.4"
futures = "0.3.12"
serde = "1.0"
serde_json = "1.0"
time = { version = "0.2.5", default-features = false, features = ["std"] }

View file

@ -47,7 +47,8 @@ use std::convert::Infallible;
use std::rc::Rc;
use futures::future::{ok, Ready};
use ntex::http::{Extensions, Payload, RequestHead};
use ntex::http::{Payload, RequestHead};
use ntex::util::Extensions;
use ntex::web::dev::{WebRequest, WebResponse};
use ntex::web::{Error, FromRequest, HttpRequest};
use serde::de::DeserializeOwned;