mirror of
https://github.com/dani-garcia/vaultwarden.wiki.git
synced 2026-11-03 20:26:47 +02:00
Upgrade to Rocket v0.5.2 (#7890)
Upgrade Rocket to v0.5.2 which has updated all the crate dependencies. Also adjusted some code which I changed with Rkt and during that found some small bugs and fixed those too. Adjusted the ETag Caching a bit. Also updated other crates and GHA. Signed-off-by: BlackDex <black.dex@gmail.com>
This commit is contained in:
1 parent
e5a90968f2
commit
44c4853d37
11 files changed
+262
-260
No files matched your search
@@ -212,7 +212,7 @@ fn websockets_hub<'r>(
|
||||
if last_received.elapsed() > WS_CLIENT_TIMEOUT {
|
||||
break;
|
||||
}
|
||||
yield Message::Ping(create_ping());
|
||||
yield Message::Ping(PING.to_vec());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -295,7 +295,7 @@ fn anonymous_websockets_hub<'r>(ws: WebSocket, token: String, ip: ClientIp) -> R
|
||||
if last_received.elapsed() > WS_CLIENT_TIMEOUT {
|
||||
break;
|
||||
}
|
||||
yield Message::Ping(create_ping());
|
||||
yield Message::Ping(PING.to_vec());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -359,6 +359,7 @@ fn convert_option<T: Into<Value>>(option: Option<T>) -> Value {
|
||||
|
||||
const RECORD_SEPARATOR: u8 = 0x1e;
|
||||
const INITIAL_RESPONSE: [u8; 3] = [0x7b, 0x7d, RECORD_SEPARATOR]; // {, }, <RS>
|
||||
const PING: [u8; 3] = [0x02, 0x91, 0x06];
|
||||
|
||||
#[derive(Deserialize, Copy, Clone, Eq, PartialEq)]
|
||||
struct InitialMessage<'a> {
|
||||
@@ -691,10 +692,6 @@ fn create_anonymous_update(payload: Vec<(Value, Value)>, ut: UpdateType, user_id
|
||||
serialize(&value)
|
||||
}
|
||||
|
||||
fn create_ping() -> Vec<u8> {
|
||||
serialize(&Value::Array(vec![6.into()]))
|
||||
}
|
||||
|
||||
// https://github.com/bitwarden/server/blob/375af7c43b10d9da03525d41452f95de3f921541/src/Core/Enums/PushType.cs
|
||||
#[derive(Copy, Clone, Eq, PartialEq)]
|
||||
pub enum UpdateType {
|
||||
|
||||
Reference in new issue
Block a user