mcp: add MCPGPDEBUG for opt-in Content-Type check (#1012)

Copy of existing
[PR](https://github.com/modelcontextprotocol/go-sdk/pull/972) patching
1.6.0 version
This commit is contained in:
Guglielmo Colombo 2026-06-17 11:41:35 +02:00 • committed by GitHub
commit 71ffcb412a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -50,6 +50,15 @@ Options listed below were added and will be removed in the 1.9.0 version of the
restoring the previous behavior. The default behavior was changed so that
the client always attempts to surface the underlying JSON-RPC error.
### 1.6.1
Options listed below were added and will be removed in the 1.8.0 version of the SDK.
- `disablecontenttypecheck` added. If set to `1`, Content-Type validation on
HTTP POST requests will be disabled, allowing requests with non-JSON or missing
Content-Type headers. The default behavior is to validate that HTTP POST
requests have Content-Type: application/json.
### 1.6.0
Options listed below were added and will be removed in the 1.8.0 version of the SDK.