[v2] move to Headers object (#1327)
Co-authored-by: Matt <77928207+mattzcarey@users.noreply.github.com>
This commit is contained in:
parent
2edbe8c82e
commit
40f6ba7a19
2 changed files with 12 additions and 12 deletions
|
|
@ -168,7 +168,7 @@ export class Server<
|
|||
if (this._capabilities.logging) {
|
||||
this.setRequestHandler(SetLevelRequestSchema, async (request, extra) => {
|
||||
const transportSessionId: string | undefined =
|
||||
extra.sessionId || (extra.requestInfo?.headers['mcp-session-id'] as string) || undefined;
|
||||
extra.sessionId || (extra.requestInfo?.headers.get('mcp-session-id') as string) || undefined;
|
||||
const { level } = request.params;
|
||||
const parseResult = LoggingLevelSchema.safeParse(level);
|
||||
if (parseResult.success) {
|
||||
|
|
|
|||
|
|
@ -596,7 +596,7 @@ export class WebStandardStreamableHTTPServerTransport implements Transport {
|
|||
|
||||
// Build request info from headers
|
||||
const requestInfo: RequestInfo = {
|
||||
headers: Object.fromEntries(req.headers.entries())
|
||||
headers: req.headers
|
||||
};
|
||||
|
||||
let rawMessage;
|
||||
|
|
|
|||
Loading…
Reference in a new issue