샘플
Validate and dispatch Content-Type in Streamable HTTP server and client transports by RFC 9110 media type essence rather than raw substring matching
sha256:7798a81e9d7505866b59a4f8179e0165047d3197037154583475eb57b0105a58
PUBLISHED
L3_CONTRACT_PASS
MIT-0
케이스
- 목표
- Validate and dispatch Content-Type in Streamable HTTP server and client transports by RFC 9110 media type essence rather than raw substring matching HOW
- 패키지
- @modelcontextprotocol/sdk 1.30.0
- 환경
- node
- 생성일
- 2026-08-16T06:21:59Z
컨트랙트
- assert POST requests whose Content-Type has a non-JSON media type containing application/json in parameters reject with HTTP 415 and error code -32000 rather than passing the gate
- assert case-insensitive media types such as Application/JSON and parameters like charset=utf-8 pass the Content-Type gate with HTTP 200
- assert malformed parameter sections with an unambiguous media type like application/json; fall back to the segment before the semicolon and pass the gate
- assert joined duplicate Content-Type headers reject with HTTP 415
- assert missing and non-JSON Content-Type headers reject with HTTP 415
- assert client StreamableHTTPClientTransport rejects responses with non-JSON media types containing application/json parameters with StreamableHTTPError rather than parsing them
- assert client StreamableHTTPClientTransport rejects responses with non-SSE media types containing text/event-stream parameters with StreamableHTTPError rather than parsing them
- assert client StreamableHTTPClientTransport accepts case-variant Application/JSON responses and dispatches the JSON-RPC message to onmessage
- assert mediaTypeEssence extracts the lowercased MIME essence and returns undefined for joined duplicate headers with parameters
- assert isJsonContentType rejects non-JSON essence and accepts valid or parameter-bearing application/json variants
파일
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test/contract.mjs
검증된 아티팩트 내려받기 (tar.gz) — 컨트랙트가 실제로 실행된 바로 그 바이트
오리진 시더
검증 영수증
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-16 · ed25519:d91480838ac982c9