Repository navigation
Commit 57d0f8e
committed
fix(client): preserve user-supplied Accept header instead of overwriting unconditionally
Custom Accept headers set in MCP server configuration (e.g.
'application/vnd.example.v1+json') were unconditionally overwritten
with 'application/json, text/event-stream', breaking APIs that require
specific Accept values.
Now only sets the default Accept header when no Accept header has
already been supplied by the caller. The SSE GET channel Accept header
is unaffected since it must always be 'text/event-stream'.
Fixes modelcontextprotocol#1646.1 parent 984a27e commit 57d0f8e
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
491 | 491 | | |
492 | 492 | | |
493 | 493 | | |
494 | | - | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
495 | 497 | | |
496 | 498 | | |
497 | 499 | | |
| |||
0 commit comments