Fix request-metadata handling of empty HTTP probes

Merged
TS
4mo ago
+74-2

Summary

  • reject unsupported HTTP methods before parsing a JSON-RPC body in the
    request-metadata client scenario
  • return a structured JSON-RPC parse error for malformed POST bodies
  • cover empty-body GET/DELETE probes and malformed POST requests with
    regression tests

This prevents a valid Streamable HTTP endpoint probe from crashing the entire
conformance runner with SyntaxError: Unexpected end of JSON input.

Fixes #408.

Validation

  • npm test (440 tests passed)
  • npm run typecheck
  • npm run lint
  • npm run build
  • exercised the scenario with a real Codex HTTP client; the adapter completed
    discovery and the runner emitted checks instead of crashing