Skip to content

fix(activesync): do not buffer Search keep-alive output - #223

Open
TDannhauer wants to merge 2 commits into
FRAMEWORK_6_0from
feat/search-streaming
Open

fix(activesync): do not buffer Search keep-alive output#223
TDannhauer wants to merge 2 commits into
FRAMEWORK_6_0from
feat/search-streaming

Conversation

@TDannhauer

Copy link
Copy Markdown
Contributor

Summary

  • Do not capture stdout during ActiveSync mailbox Search when a keep-alive progress callback is present.

Motivation

Streaming Search emits WBXML keep-alives during a long IMAP scan so Gmail’s 30s read timeout does not abort the request (horde/ActiveSync#104). getSearchResults() wrapped that work in ob_start(), which would swallow those bytes.

Changes

  • Skip ob_start() / _endBuffer() when options['progress'] is callable.
  • Exclude progress from the search-result cache key so a Closure is not serialized.

Companion: ActiveSync Search streaming + IMAP date-chunking; RPC streams Cmd=Search.

Test plan

  • With streaming Search: keep-alives appear on the wire during IMAP work (ActiveSync device log / HTTP)
  • Cached Search results still rebuild when RebuildResults is set

Skip ob_start around mailbox search when a progress callback is present
so WBXML keep-alives reach the client. Exclude the callback from the
search cache key.
…ache

Do not cache time-truncated mailbox Search results, and omit deadline and stats from the cache key so keep-alive callbacks cannot poison it.
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.

1 participant