Skip to content

bug: client init with streamable http transport got unexpected nil response due to server response with arbitrary json data but in an SSE mode #447

@cmsax

Description

@cmsax

Issue Description

During the initialization phase, the server responds with data in SSE (text/event-stream) format, but subsequently fails to send any additional data through the established channel.

The client processes this response using standard SSE handling mechanisms, resulting in an empty response being received.

Supporting Evidence

Initial SSE response header confirmation:

SSE Response Header

Empty response data observation:

Empty Response Data

Proposed Solution

Enhance the client-side readSSE method implementation to:
Maintain standard SSE protocol handling for data: and event: formatted messages

Implement a fallback mechanism to process arbitrary data formats when standard SSE formatting is not present

Ensure proper error handling and data validation throughout the process

This modification will improve robustness while maintaining backward compatibility with existing SSE implementations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions