From cf9e6c03a092acf8808ce83dad9249414fe4d588 Mon Sep 17 00:00:00 2001 From: Gabriel Goller Date: Tue, 8 Apr 2025 15:26:26 +0200 Subject: [PATCH] rest-server: increase max body size Increase maximum POST request body size from 64 kiB to 512 kiB to match the value used in pve-http-server [0]. This change addresses potential limitations with the newly introduced consent-banner feature, which can contain lots of text that could approach the previous limits [1]. [0]: https://git.proxmox.com/?p=pve-http-server.git;a=commit;h=2650923a42c9ea357dc0e663a69294410190cc7c [1]: https://lore.proxmox.com/pbs-devel/e0cfec76-5149-4d3d-80be-b96ae633e1ee@proxmox.com/ Suggested-by: Thomas Lamprecht Signed-off-by: Gabriel Goller Link: https://lore.proxmox.com/20250408132626.381476-1-g.goller@proxmox.com Signed-off-by: Thomas Lamprecht --- proxmox-rest-server/src/rest.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/proxmox-rest-server/src/rest.rs b/proxmox-rest-server/src/rest.rs index f5a72052..98e8268f 100644 --- a/proxmox-rest-server/src/rest.rs +++ b/proxmox-rest-server/src/rest.rs @@ -405,8 +405,7 @@ async fn get_request_parameters( http_err!(BAD_REQUEST, "Problems reading request body: {}", err) }) .try_fold(Vec::new(), |mut acc, chunk| async move { - // FIXME: max request body size? - if acc.len() + chunk.len() < 64 * 1024 { + if acc.len() + chunk.len() < 512 * 1024 { acc.extend_from_slice(&chunk); Ok(acc) } else {