]> dgit.raspbian.org Git - dovecot.git/commit
[PATCH 02/14] imap: Stream BODYSTRUCTURE to client without ostream memory duplication
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Fri, 17 Apr 2026 14:55:05 +0000 (16:55 +0200)
committerNoah Meyerhans <noahm@debian.org>
Wed, 16 Sep 2026 19:06:35 +0000 (15:06 -0400)
commitd0adf60476b521447ece50a5a7d3e95dee66e9f9
treede6bb7c4c92c90f16b65d976b8707b4408b0919d
parent53e6ddc9f8fb954fd4dd7a17052a16905cbe1c9a
[PATCH 02/14] imap: Stream BODYSTRUCTURE to client without ostream memory duplication

For huge BODYSTRUCTURE responses (messages with many MIME parts),
o_stream_send_str() caused the ostream to copy the entire string into
its ring buffer when the stream was corked, doubling memory usage.

Use the same o_stream_set_max_buffer_size(0) + o_stream_send_istream()
pattern as fetch_stream_continue() so the ostream buffer stays at 0
bytes and the I/O loop handles flow control via WAIT_OUTPUT.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Gbp-Pq: Name 0002-imap-Stream-BODYSTRUCTURE-to-client-without-ostream-.patch
src/imap/imap-fetch.c