Class Nexus\Mcp\Server\Transport\Http\Middleware\RequestBodySizeLimitMiddleware

final
readonly
implements MiddlewareInterface

Rejects a request whose body exceeds a configured byte cap before it reaches the transport. An oversized body is answered with an id-less JSON-RPC error on HTTP 413, sparing the transport the cost of stringifying and parsing it. The cap is measured against the buffered body size. A body whose size cannot be determined passes through, leaving a streaming cap to the HTTP server.

Methods