diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-14 18:10:48 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-14 18:11:22 +0300 |
| commit | c269eeea138c002b46844b4d25c8af0c34e72447 (patch) | |
| tree | 30e482d3205cd408dfdbe533ac1377b1a8c103e9 /src/server/protocol.rs | |
| parent | fff55440305437b2e221156d9e6a5f59e7853213 (diff) | |
fix: allow larger kitty graphics frames
Diffstat (limited to 'src/server/protocol.rs')
| -rw-r--r-- | src/server/protocol.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/server/protocol.rs b/src/server/protocol.rs index e0a3c4a0..1a220767 100644 --- a/src/server/protocol.rs +++ b/src/server/protocol.rs @@ -19,6 +19,11 @@ pub const PROTOCOL_VERSION: u32 = 5; /// rejected to prevent denial-of-service via oversized length prefixes. pub const MAX_FRAME_SIZE: usize = 2 * 1024 * 1024; +/// Maximum allowed server-to-client frame payload when Kitty graphics are enabled. +/// Normal traffic keeps `MAX_FRAME_SIZE`; this larger cap is only for explicit +/// image payloads that are naturally much larger after base64 encoding. +pub const MAX_GRAPHICS_FRAME_SIZE: usize = 32 * 1024 * 1024; + /// Length of the u32 little-endian length prefix in bytes. const LENGTH_PREFIX_BYTES: usize = 4; |
