Skip to content

Commit 6616042

Browse files
committed
Remove duplicated headers in HttpServletStatelessIntegrationTests
Signed-off-by: Yanming Zhou <[email protected]>
1 parent a0afdcd commit 6616042

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

mcp-core/src/test/java/io/modelcontextprotocol/server/HttpServletStatelessIntegrationTests.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -615,11 +615,9 @@ void testThrownMcpErrorAndJsonRpcError() throws Exception {
615615

616616
byte[] content = JSON_MAPPER.writeValueAsBytes(jsonrpcRequest);
617617
request.setContent(content);
618-
request.addHeader("Content-Type", "application/json");
619-
request.addHeader("Content-Length", Integer.toString(content.length));
618+
request.addHeader("Content-Type", APPLICATION_JSON);
620619
request.addHeader("Content-Length", Integer.toString(content.length));
621620
request.addHeader("Accept", APPLICATION_JSON + ", " + TEXT_EVENT_STREAM);
622-
request.addHeader("Content-Type", APPLICATION_JSON);
623621
request.addHeader("Cache-Control", "no-cache");
624622
request.addHeader(HttpHeaders.PROTOCOL_VERSION, ProtocolVersions.MCP_2025_03_26);
625623

0 commit comments

Comments
 (0)