Skip to content

feat(rpc): stream ActiveSync Search responses - #7

Merged
ralflang merged 1 commit into
FRAMEWORK_6_0from
feat/search-streaming
Sep 14, 2026
Merged

ralflang merged 1 commit into
FRAMEWORK_6_0from
feat/search-streaming

Conversation

@TDannhauer

Copy link
Copy Markdown
Contributor

Summary

  • Stream ActiveSync Cmd=Search responses the same way as Cmd=Sync when $conf['activesync']['sync']['streaming'] is enabled.

Motivation

Gmail Android aborts mailbox Search after 30 seconds without response body bytes (SocketTimeout). Search was still fully buffered, so a large IMAP TEXT scan never reached the client in time. See horde/ActiveSync#104.

Changes

  • _shouldStreamResponse() treats Search POST like Sync (chunked transfer-encoding, no Content-Length).
  • Other commands (GetAttachment, ItemOperations, Find, …) stay on the buffered path.
  • Unit test covers Search streaming enablement.

Companion PRs: ActiveSync Search handler keep-alives + IMAP date-chunking, and Core skipping ob_start around keep-alives.

Test plan

  • PHPUnit: ActiveSyncStreamingTest (Search streams; ItemOperations/Find do not)
  • With streaming on: Gmail Search on a large mailbox returns hits instead of “Problem syncing”
  • With streaming = false: Search still uses a buffered Content-Length response

Extend the Sync streaming path to Cmd=Search so Gmail's 30s read
timeout does not abort mailbox search while IMAP is still running.
@ralflang
ralflang merged commit e99c3a1 into FRAMEWORK_6_0 Sep 14, 2026
1 check failed
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