]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Fix] protocol: Handle shared memory and whole-body compression for v3 proxy path
authorVsevolod Stakhov <vsevolod@rspamd.com>
Sun, 8 Feb 2026 14:20:45 +0000 (14:20 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Sun, 8 Feb 2026 14:20:45 +0000 (14:20 +0000)
commit0fae86945aef469da14c642d5c30a528209e5de9
treea9336f238b8ccc7435d1d3b9ce8c4a554f8bf37f
parent205b019740a1c45da9b70d76d002618edabd23a8
[Fix] protocol: Handle shared memory and whole-body compression for v3 proxy path

When the proxy forwards /checkv3 requests to a local upstream, it uses
shared memory (GET + Shm headers) instead of sending the body inline.
The v3 request handler only read from chunk/len parameters which are
empty in this case. Add Shm/Shm-Offset/Shm-Length header handling to
read the body from the shared memory segment.

Additionally, the proxy may compress the entire response body with zstd
before forwarding to the client. The v3 client finish handler parsed
multipart directly from the compressed body_buf. Add whole-body
decompression (matching the v2 handler) before multipart parsing.
src/client/rspamdclient.c
src/libserver/protocol.c