Skip to content

Handle SSE data fields without spaces - #60575

Merged
dinocosta merged 3 commits into
zed-industries:mainfrom
justjavac:fix-mcp-sse-data-field
Jul 29, 2026
Merged

Handle SSE data fields without spaces#60575
dinocosta merged 3 commits into
zed-industries:mainfrom
justjavac:fix-mcp-sse-data-field

Conversation

@justjavac

Copy link
Copy Markdown
Contributor

Fixes #60270.

Summary

  • Accept MCP HTTP SSE data: fields when the optional space after the colon is omitted.
  • Add a regression test covering data:{...} streamable HTTP responses.

Tests

  • cargo fmt --check
  • cargo test -p context_server test_sse_data_field_without_space_after_colon -- --nocapture
  • cargo test -p context_server -- --nocapture

Release Notes:

  • Fixed MCP HTTP context servers timing out when SSE data fields omit the optional space after the colon.

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Jul 8, 2026
@dinocosta dinocosta added the area:ai/mcp Model Context Protocol label Jul 8, 2026
@dinocosta dinocosta self-assigned this Jul 8, 2026

@dinocosta dinocosta left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for tackling this @justjavac !

Change looks good but left a couple of comments on things I believe we could improve before shipping 🙂

Comment thread crates/context_server/src/transport/http.rs Outdated
Comment thread crates/context_server/src/transport/http.rs Outdated
@justjavac

Copy link
Copy Markdown
Contributor Author

Addressed both review comments in adcad63: simplified the SSE data field parser and expanded the regression test to cover both data: and data: forms.

@dinocosta

Copy link
Copy Markdown
Member

Addressed both review comments in adcad63: simplified the SSE data field parser and expanded the regression test to cover both data: and data: forms.

Thank you @justjavac ! ✌️

@dinocosta
dinocosta enabled auto-merge July 8, 2026 17:08
@bennetbo bennetbo added the area:ai Related to Agent Panel, Edit Prediction, Copilot, or other AI features label Jul 10, 2026
@dinocosta
dinocosta added this pull request to the merge queue Jul 29, 2026
Merged via the queue into zed-industries:main with commit 007ffc7 Jul 29, 2026
36 checks passed
AtlantisPleb pushed a commit to OpenAgentsInc/omega that referenced this pull request Jul 30, 2026
Fixes zed-industries#60270.

## Summary

- Accept MCP HTTP SSE `data:` fields when the optional space after the
colon is omitted.
- Add a regression test covering `data:{...}` streamable HTTP responses.

## Tests

- `cargo fmt --check`
- `cargo test -p context_server
test_sse_data_field_without_space_after_colon -- --nocapture`
- `cargo test -p context_server -- --nocapture`

Release Notes:

- Fixed MCP HTTP context servers timing out when SSE data fields omit
the optional space after the colon.

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
(cherry picked from commit 007ffc7)
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
Fixes zed-industries#60270.

## Summary

- Accept MCP HTTP SSE `data:` fields when the optional space after the
colon is omitted.
- Add a regression test covering `data:{...}` streamable HTTP responses.

## Tests

- `cargo fmt --check`
- `cargo test -p context_server
test_sse_data_field_without_space_after_colon -- --nocapture`
- `cargo test -p context_server -- --nocapture`

Release Notes:

- Fixed MCP HTTP context servers timing out when SSE data fields omit
the optional space after the colon.

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
playdohface pushed a commit to playdohface/zed that referenced this pull request Aug 29, 2026
Fixes zed-industries#60270.

## Summary

- Accept MCP HTTP SSE `data:` fields when the optional space after the
colon is omitted.
- Add a regression test covering `data:{...}` streamable HTTP responses.

## Tests

- `cargo fmt --check`
- `cargo test -p context_server
test_sse_data_field_without_space_after_colon -- --nocapture`
- `cargo test -p context_server -- --nocapture`

Release Notes:

- Fixed MCP HTTP context servers timing out when SSE data fields omit
the optional space after the colon.

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ai/mcp Model Context Protocol area:ai Related to Agent Panel, Edit Prediction, Copilot, or other AI features cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCP HTTP transport times out when SSE data fields omit the optional space after colon

3 participants