File tree Expand file tree Collapse file tree 3 files changed +1
-30
lines changed
Expand file tree Collapse file tree 3 files changed +1
-30
lines changed Original file line number Diff line number Diff line change @@ -442,12 +442,6 @@ export class Server<
442442
443443 const protocolVersion = SUPPORTED_PROTOCOL_VERSIONS . includes ( requestedVersion ) ? requestedVersion : LATEST_PROTOCOL_VERSION ;
444444
445- // Inform the transport of the negotiated protocol version.
446- // This allows the transport to validate subsequent request headers.
447- if ( this . transport ?. setProtocolVersion ) {
448- this . transport . setProtocolVersion ( protocolVersion ) ;
449- }
450-
451445 return {
452446 protocolVersion,
453447 capabilities : this . getCapabilities ( ) ,
Original file line number Diff line number Diff line change @@ -184,7 +184,6 @@ export class StreamableHTTPServerTransport implements Transport {
184184 private _allowedOrigins ?: string [ ] ;
185185 private _enableDnsRebindingProtection : boolean ;
186186 private _retryInterval ?: number ;
187- private _protocolVersion ?: string ;
188187
189188 sessionId ?: string ;
190189 onclose ?: ( ) => void ;
@@ -214,21 +213,6 @@ export class StreamableHTTPServerTransport implements Transport {
214213 this . _started = true ;
215214 }
216215
217- /**
218- * Sets the protocol version after negotiation during initialization.
219- * This is called by the Server class after the initialize handshake completes.
220- */
221- setProtocolVersion ( version : string ) : void {
222- this . _protocolVersion = version ;
223- }
224-
225- /**
226- * Gets the negotiated protocol version, if set.
227- */
228- get protocolVersion ( ) : string | undefined {
229- return this . _protocolVersion ;
230- }
231-
232216 /**
233217 * Validates request headers for DNS rebinding protection.
234218 * @returns Error message if validation fails, undefined if validation passes.
Original file line number Diff line number Diff line change @@ -122,14 +122,7 @@ export interface Transport {
122122 sessionId ?: string ;
123123
124124 /**
125- * Sets the protocol version after negotiation during initialization.
126- * This is called by the Server/Client class after the initialize handshake completes.
125+ * Sets the protocol version used for the connection (called when the initialize response is received).
127126 */
128127 setProtocolVersion ?: ( version : string ) => void ;
129-
130- /**
131- * Gets the negotiated protocol version, if set.
132- * Available after initialization completes.
133- */
134- protocolVersion ?: string ;
135128}
You can’t perform that action at this time.
0 commit comments