Severity: P2. Reviewed at 82b715c.
S2 (SPEC.md:24) requires Content-Type: application/json on requests but never says what a server does when it gets something else. The conformance suite shrugs at the gap rather than closing it:
| R-4 | Content-Type other than application/json | 400 or 415 |
"400 or 415" is not a conformance assertion -- a client cannot branch on it, and two conforming servers can disagree.
Fix: pin 415, register unsupported_media_type
415 is the correct HTTP status for this condition, and none of the eight currently registered error codes fits: bad_request is about the request body, and conflating a malformed body with an unacceptable media type loses the distinction a client needs to retry correctly (fix your headers vs. fix your payload).
Per S11, adding an error code is an additive minor change, so this is in scope for a v0.1.x revision rather than requiring a major.
Acceptance
Origin: codex spec review, verified against SPEC.md:24 and conformance/README.md R-4.
Severity: P2. Reviewed at 82b715c.
S2 (
SPEC.md:24) requiresContent-Type: application/jsonon requests but never says what a server does when it gets something else. The conformance suite shrugs at the gap rather than closing it:| R-4 |
Content-Typeother thanapplication/json| 400 or 415 |"400 or 415" is not a conformance assertion -- a client cannot branch on it, and two conforming servers can disagree.
Fix: pin 415, register
unsupported_media_type415 is the correct HTTP status for this condition, and none of the eight currently registered error codes fits:
bad_requestis about the request body, and conflating a malformed body with an unacceptable media type loses the distinction a client needs to retry correctly (fix your headers vs. fix your payload).Per S11, adding an error code is an additive minor change, so this is in scope for a v0.1.x revision rather than requiring a major.
Acceptance
Content-Type: 415 witherror.code=unsupported_media_type.unsupported_media_typeadded to the S7 registered code table with HTTP 415.Origin: codex spec review, verified against
SPEC.md:24andconformance/README.mdR-4.