mcp/streamable: fixes broken DELETE request on connection close

Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
This commit is contained in:
Takeshi Yoneda 2025-08-26 14:22:03 -07:00 • committed by Robert Findley
commit c24d9856c4

View file

@ -133,7 +133,7 @@ func (h *StreamableHTTPHandler) ServeHTTP(w http.ResponseWriter, req *http.Reque
http.Error(w, "Accept must contain 'text/event-stream' for GET requests", http.StatusBadRequest)
return
}
} else if !jsonOK || !streamOK {
} else if (!jsonOK || !streamOK) && req.Method != http.MethodDelete {
http.Error(w, "Accept must contain both 'application/json' and 'text/event-stream'", http.StatusBadRequest)
return
}