Skip to content

Commit 3a95f75

Browse files
quafftzolov
authored andcommitted
Remove duplicate header MCP_PROTOCOL_VERSION
Signed-off-by: Yanming Zhou <[email protected]>
1 parent 5e035ea commit 3a95f75

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

mcp-spring/mcp-spring-webflux/src/main/java/io/modelcontextprotocol/client/transport/WebClientStreamableHttpTransport.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,8 @@ private DefaultMcpTransportSession createTransportSession() {
143143
Function<String, Publisher<Void>> onClose = sessionId -> sessionId == null ? Mono.empty()
144144
: webClient.delete()
145145
.uri(this.endpoint)
146+
.header(HttpHeaders.MCP_SESSION_ID, sessionId)
146147
.header(HttpHeaders.PROTOCOL_VERSION, MCP_PROTOCOL_VERSION)
147-
.headers(httpHeaders -> {
148-
httpHeaders.add(HttpHeaders.MCP_SESSION_ID, sessionId);
149-
httpHeaders.add(HttpHeaders.PROTOCOL_VERSION, MCP_PROTOCOL_VERSION);
150-
})
151148
.retrieve()
152149
.toBodilessEntity()
153150
.onErrorComplete(e -> {

0 commit comments

Comments
 (0)