Skip to content

Commit f9d5b2d

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

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

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

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

494494
byte[] content = new ObjectMapper().writeValueAsBytes(jsonrpcRequest);
495495
request.setContent(content);
496-
request.addHeader("Content-Type", "application/json");
497-
request.addHeader("Content-Length", Integer.toString(content.length));
496+
request.addHeader("Content-Type", APPLICATION_JSON);
498497
request.addHeader("Content-Length", Integer.toString(content.length));
499498
request.addHeader("Accept", APPLICATION_JSON + ", " + TEXT_EVENT_STREAM);
500-
request.addHeader("Content-Type", APPLICATION_JSON);
501499
request.addHeader("Cache-Control", "no-cache");
502500
request.addHeader(HttpHeaders.PROTOCOL_VERSION, ProtocolVersions.MCP_2025_03_26);
503501
mcpStatelessServerTransport.service(request, response);

0 commit comments

Comments
 (0)