HeaderMismatch
Less than 1 minute
HeaderMismatch
Thrown when a request header disagrees with the request body.
class HeaderMismatch extends \Hazaar\MCP\Exception\ProtocolErrorExtends: Hazaar\MCP\Exception\ProtocolError
The transport mirrors selected body fields into headers so intermediaries can route without parsing the body. The headers are optional — clients that carry everything in the body alone are not rejected for omitting them — but validating that the two agree when a header is present is mandatory: a load balancer trusting the header while the server executes on the body is a request-smuggling vector.
Methods
mismatch
Builds an exception for a header whose value disagrees with the request body.
public mismatch(string $header, string $headerValue, string $bodyValue): selfReturns: self
Parameters
| Parameter | Type | Description |
|---|---|---|
$header | string | the header name |
$headerValue | string | the value received in the header |
$bodyValue | string | the corresponding value found in the body |
__construct
public __construct(string $reason): voidParameters
| Parameter | Type | Description |
|---|---|---|
$reason | string |
Generated by Hazaar API Doc Generator on Sun, 23 Aug 2026 10:49:44 +0000