You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5436fc1
Browse filesBrowse the repository at this point in the historyBrowse files
fix: introduce ServerHttpHeaderValidator with non-breaking deprecation path
Deprecates ServerTransportSecurityValidator (kept as-is, still
@FunctionalInterface, fully binary-compatible) and introduces
ServerHttpHeaderValidator, which validates via the new HeaderAccessor
abstraction instead of a pre-built Map. DefaultServerTransportSecurityValidator
now implements both. A static toHttpHeaderValidator(ServerTransportSecurityValidator)
adapter lets old validators plug into the new API. The three servlet
transports (SSE, stateless, streamable) now use ServerHttpHeaderValidator
internally; their deprecated securityValidator(...) builder methods wrap
existing validators through the adapter so no existing caller breaks.
Addresses review feedback from #982.
Copy file name to clipboardExpand all lines: mcp-core/src/main/java/io/modelcontextprotocol/server/transport/DefaultServerTransportSecurityValidator.java
Copy file name to clipboardExpand all lines: mcp-core/src/main/java/io/modelcontextprotocol/server/transport/HttpServletSseServerTransportProvider.java
+25-10Lines changed: 25 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -161,7 +161,7 @@ public class HttpServletSseServerTransportProvider extends HttpServlet implement
161
161
/**
162
162
* Security validator for validating HTTP requests.
Copy file name to clipboardExpand all lines: mcp-core/src/main/java/io/modelcontextprotocol/server/transport/HttpServletStreamableServerTransportProvider.java
+26-11Lines changed: 26 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -129,7 +129,7 @@ public class HttpServletStreamableServerTransportProvider extends HttpServlet
129
129
/**
130
130
* Security validator for validating HTTP requests.
0 commit comments