We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent becd787 commit b9e4223Copy full SHA for b9e4223
src/server/sse.ts
@@ -68,6 +68,7 @@ export class SSEServerTransport implements Transport {
68
async handlePostMessage(
69
req: IncomingMessage,
70
res: ServerResponse,
71
+ rawBody?: string
72
): Promise<void> {
73
if (!this._sseResponse) {
74
const message = "SSE connection not established";
@@ -82,7 +83,7 @@ export class SSEServerTransport implements Transport {
82
83
throw new Error(`Unsupported content-type: ${ct}`);
84
}
85
- body = await getRawBody(req, {
86
+ body = rawBody ?? await getRawBody(req, {
87
limit: MAXIMUM_MESSAGE_SIZE,
88
encoding: ct.parameters.charset ?? "utf-8",
89
});
0 commit comments