Flush headers for idle Streamable HTTP GET requests - #1159
Open
karthiksenv wants to merge 2 commits into
Open
karthiksenv wants to merge 2 commits into
karthiksenv wants to merge 2 commits into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An idle Streamable HTTP GET currently sends neither status nor headers until the first SSE event, causing clients to time out when keep-alive is disabled. Flush the servlet response after registering the listening stream so clients receive HTTP 200 and
Content-Type: text/event-streamimmediately.Adds an embedded-Tomcat regression test with keep-alive disabled. The test timed out before the fix and passes with it.
Fixes #1155.
Validation:
HttpServletStreamableIntegrationTests: all 54 tests passed.mvnw.cmd -pl mcp-core,mcp-test -am test: core and Jackson modules passed; mcp-test ran 823 tests with 13 errors, including unavailable Docker/dependent initialization errors and a stdio timeout. The broader suite is not fully green in this environment.git diff --checkpassed.This is an AI-assisted contribution. The required repository-policy disclosure is included in
disclosure.txt.