Skip to content

feat(sse): add SSEParserConfig, raise default per-line limit to 1 MB - #1149

Open
ehsavoie wants to merge 1 commit into
a2aproject:mainfrom
ehsavoie:issue_1123
Open

feat(sse): add SSEParserConfig, raise default per-line limit to 1 MB#1149
ehsavoie wants to merge 1 commit into
a2aproject:mainfrom
ehsavoie:issue_1123

Conversation

@ehsavoie

@ehsavoie ehsavoie commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator
  • Introduce SSEParserConfig record with builder to make SSE parser
    limits (maxLineLength, maxBufferLines, maxBufferChars) configurable
  • Raise default per-line limit from 64 KB to 1 MB so large JSON-RPC
    responses are no longer silently dropped
  • Thread SSEParserConfig through all HTTP client implementations
    (JDK, Android, OkHttp) via new constructors and provider methods
  • Prevent corrupt/skipped event blocks from advancing lastEventId,
    which could cause event loss on reconnect
  • Add AbstractA2AHttpClientSSETest for shared cross-client SSE tests
  • Document SSEParserConfig usage and security considerations

Fixes #1123 🦕

Comment thread server-common/src/main/resources/META-INF/a2a-defaults.properties Outdated
@ehsavoie
ehsavoie force-pushed the issue_1123 branch 2 times, most recently from c0569cb to 0e88bb7 Compare September 11, 2026 10:03
@ehsavoie ehsavoie changed the title feat(sse): make parser limits configurable via SSEParserConfig feat(sse): add SSEParserConfig, raise default per-line limit to 1 MB Sep 11, 2026
- Introduce SSEParserConfig record with builder to make SSE parser
  limits (maxLineLength, maxBufferLines, maxBufferChars) configurable
- Raise default per-line limit from 64 KB to 1 MB so large JSON-RPC
  responses are no longer silently dropped
- Thread SSEParserConfig through all HTTP client implementations
  (JDK, Android, OkHttp) via new constructors and provider methods
- Prevent corrupt/skipped event blocks from advancing lastEventId,
  which could cause event loss on reconnect
- Add AbstractA2AHttpClientSSETest for shared cross-client SSE tests
- Document SSEParserConfig usage and security considerations

Fixes a2aproject#1123

Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>
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.

[Bug]: SSE client rejects any event whose data arrives on a single line over 64KB, with no way to configure the limit

2 participants