mirror of
https://github.com/ntex-rs/ntex-extras.git
synced 2025-04-04 05:17:40 +03:00
update ntex
This commit is contained in:
parent
5671bf00d8
commit
7fdc863607
2 changed files with 4 additions and 4 deletions
|
@ -22,7 +22,7 @@ default = ["cookie-session"]
|
||||||
cookie-session = ["cookie/secure", "ntex/cookie"]
|
cookie-session = ["cookie/secure", "ntex/cookie"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
ntex = "0.1.8"
|
ntex = "0.1.11"
|
||||||
bytes = "0.5.4"
|
bytes = "0.5.4"
|
||||||
cookie = "0.13.3"
|
cookie = "0.13.3"
|
||||||
derive_more = "0.99.5"
|
derive_more = "0.99.5"
|
||||||
|
|
|
@ -362,17 +362,17 @@ where
|
||||||
match Session::get_changes(&mut res) {
|
match Session::get_changes(&mut res) {
|
||||||
(SessionStatus::Changed, Some(state))
|
(SessionStatus::Changed, Some(state))
|
||||||
| (SessionStatus::Renewed, Some(state)) => {
|
| (SessionStatus::Renewed, Some(state)) => {
|
||||||
res.checked_expr::<_, _, Err>(|res| inner.set_cookie(res, state))
|
res.checked_expr::<Err, _, _>(|res| inner.set_cookie(res, state))
|
||||||
}
|
}
|
||||||
(SessionStatus::Unchanged, Some(state)) if prolong_expiration => {
|
(SessionStatus::Unchanged, Some(state)) if prolong_expiration => {
|
||||||
res.checked_expr::<_, _, Err>(|res| inner.set_cookie(res, state))
|
res.checked_expr::<Err, _, _>(|res| inner.set_cookie(res, state))
|
||||||
}
|
}
|
||||||
(SessionStatus::Unchanged, _) =>
|
(SessionStatus::Unchanged, _) =>
|
||||||
// set a new session cookie upon first request (new client)
|
// set a new session cookie upon first request (new client)
|
||||||
{
|
{
|
||||||
if is_new {
|
if is_new {
|
||||||
let state: HashMap<String, String> = HashMap::new();
|
let state: HashMap<String, String> = HashMap::new();
|
||||||
res.checked_expr::<_, _, Err>(|res| {
|
res.checked_expr::<Err, _, _>(|res| {
|
||||||
inner.set_cookie(res, state.into_iter())
|
inner.set_cookie(res, state.into_iter())
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue