Commit 8ad6ad0
committed
fix: handle 404 and 406 gracefully in SSE stream initialization
Widen the response status check in StreamableHTTPClientTransport._startOrAuthSse()
from 405-only to include 404 and 406. Servers that only support POST-based
communication (no GET SSE stream) commonly return 404 (no handler) or 406
(Accept header rejected) instead of the spec-defined 405. All three statuses
indicate the server does not offer an SSE stream at the GET endpoint.
Fixes #16351 parent 42cb6b2 commit 8ad6ad0
1 file changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
285 | | - | |
286 | | - | |
287 | | - | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
288 | 290 | | |
289 | 291 | | |
290 | 292 | | |
| |||
0 commit comments