Skip to content

Send MCP client requests as an entity that can be read again (#1777) - #1778

Merged
jlouvel merged 2 commits into
3.0from
fix/1777-mcp-client-repeatable-entity
Nov 30, 2026
Merged

jlouvel merged 2 commits into
3.0from
fix/1777-mcp-client-repeatable-entity

Conversation

@jlouvel

@jlouvel jlouvel commented Nov 30, 2026

Copy link
Copy Markdown
Collaborator

Fixes #1777.

The MCP client sent its JSON-RPC message as a ByteArrayRepresentation, an InputRepresentation, so a transient entity: a request customizer could not read it twice. HttpAwsSigV4Helper hashes the body before it signs, and getPayloadHash returns null for a transient entity, so a service other than S3 failed with needs an entity that can be read again, and an S3 body was signed UNSIGNED-PAYLOAD.

Both client transports (McpModernHttpTransport, RestletMcpClientTransport) now send a StringRepresentation of the encoded message, which can be read again. A test checks that the entity is not transient and gives the same text twice.

Found moving naftiko/ikanos's consumed MCP servers to the Restlet client (naftiko/ikanos#1256).

A transient body could not be hashed by the AWS SigV4 signer of a request customizer.

Signed-off-by: Jerome Louvel <[email protected]>
@sonarqubecloud

Copy link
Copy Markdown

@jlouvel
jlouvel merged commit e4e7aa9 into 3.0 Nov 30, 2026
3 checks passed
@jlouvel
jlouvel deleted the fix/1777-mcp-client-repeatable-entity branch November 30, 2026 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant