Skip to content

Support forward-only APPEND streams with explicit lengths - #66

Merged
ralflang merged 1 commit into
horde:FRAMEWORK_6_0from
neuhaus:feat/forward-only-append
Nov 4, 2026
Merged

ralflang merged 1 commit into
horde:FRAMEWORK_6_0from
neuhaus:feat/forward-only-append

Conversation

@neuhaus

@neuhaus neuhaus commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Horde uses php://temp internally for some APPEND conversions and downloaded content. It starts in memory and normally spills to disk at 2 MB.

The new explicit-length APPEND path creates no payload spool.
With this change, known-length uploads stream directly into one IMAP message, without having to scan or rewind first.

@what-the-diff

what-the-diff Bot commented Nov 3, 2026

Copy link
Copy Markdown

PR Summary

  • Adds support for forward-only APPEND streams. Callers can provide a stream and its byte length, allowing data to be sent without seeking or reading ahead. Only the declared number of bytes is consumed, and any remaining source data is preserved.
  • Clarifies how to use streams safely. The documentation explains that callers retain ownership of the source, unknown-length inputs must be staged first, and one-pass streams cannot be replayed.
  • Improves failure handling. The client validates stream inputs and avoids retrying an APPEND after a one-pass source has been consumed. Short or invalid sources are rejected.
  • Adds coverage for the new behavior. Tests check stream consumption, validation, retry limits, BINARY capability checks, and handling of short sources.

@ralflang

ralflang commented Nov 4, 2026

Copy link
Copy Markdown
Member

Thank you!

@ralflang
ralflang merged commit c798455 into horde:FRAMEWORK_6_0 Nov 4, 2026
1 check passed
@neuhaus
neuhaus deleted the feat/forward-only-append branch November 4, 2026 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants