Skip to content

Conversation

@findleyr
Copy link
Contributor

@findleyr findleyr commented Sep 3, 2025

The condition sessionID == "" was not quite right for disallowing GET requests. Since we decided to differentiate "stateless" vs "sessionless" servers, we need to disallow GET requests for both.

For #393

The condition sessionID == "" was not quite right for disallowing GET
requests. Since we decided to differentiate "stateless" vs "sessionless"
servers, we need to disallow GET requests for both.

For modelcontextprotocol#393
@findleyr findleyr requested a review from jba September 3, 2025 20:11
@findleyr findleyr merged commit a1eb484 into modelcontextprotocol:main Sep 3, 2025
5 checks passed
switch req.Method {
case http.MethodPost, http.MethodGet:
if req.Method == http.MethodGet && sessionID == "" {
if req.Method == http.MethodGet && (h.opts.Stateless || sessionID == "") {
Copy link

Choose a reason for hiding this comment

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

Thanks!!! Looks good!

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.

3 participants