Commit d56acce
committed
fix: skip leading UTF-8 BOM when detecting unframed JSON in MCP proxy
startsWithJSONObject treated a leading UTF-8 BOM as a non-JSON byte, so a
BOM-prefixed unframed JSON body advertised as text/event-stream was handed
to the SSE parser and silently dropped. Skip the BOM before scanning; the
decode path (tryDecodeJSONRPCMessage) already strips it.
Signed-off-by: RegondaChandan <sairegonda9@gmail.com>1 parent be3f7b3 commit d56acce
2 files changed
Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
838 | 838 | | |
839 | 839 | | |
840 | 840 | | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
841 | 844 | | |
842 | 845 | | |
843 | 846 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1110 | 1110 | | |
1111 | 1111 | | |
1112 | 1112 | | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
1113 | 1136 | | |
1114 | 1137 | | |
1115 | 1138 | | |
| |||
0 commit comments