Revert "fix(server): application/json header for notifictions" (#1388)
This commit is contained in:
parent
40f6ba7a19
commit
f66a55b5f4
3 changed files with 2 additions and 8 deletions
5
.changeset/heavy-walls-swim.md
Normal file
5
.changeset/heavy-walls-swim.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@modelcontextprotocol/server': patch
|
||||
---
|
||||
|
||||
reverting application/json in notifications
|
||||
|
|
@ -657,7 +657,6 @@ describe.each(zodTestMatrix)('$zodVersionLabel', (entry: ZodMatrixEntry) => {
|
|||
const response = await sendPostRequest(baseUrl, batchNotifications, sessionId);
|
||||
|
||||
expect(response.status).toBe(202);
|
||||
expect(response.headers.get('content-type')).toBe('application/json');
|
||||
});
|
||||
|
||||
it('should handle batch request messages with SSE stream for responses', async () => {
|
||||
|
|
|
|||
|
|
@ -667,12 +667,7 @@ export class WebStandardStreamableHTTPServerTransport implements Transport {
|
|||
for (const message of messages) {
|
||||
this.onmessage?.(message, { authInfo: options?.authInfo, requestInfo });
|
||||
}
|
||||
return new Response(null, {
|
||||
status: 202,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
return new Response(null, { status: 202 });
|
||||
}
|
||||
|
||||
// The default behavior is to use SSE streaming
|
||||
|
|
|
|||
Loading…
Reference in a new issue