CodeSampleX

サンプル

Handle Express request header evaluation boundaries across req.is body presence, req.accepts zero-weight quality factors, req.range numeric sentinel codes, and req.get empty-string validation

sha256:e74ad98b97d3ae7856fa4fd5b676002a0036a58f77d64b678a2ecb9d6561a100

PUBLISHED L3_CONTRACT_PASS MIT-0

ケース

ゴール
Handle Express request header evaluation boundaries across req.is body presence, req.accepts zero-weight quality factors, req.range numeric sentinel codes, and req.get empty-string validation HOW
パッケージ
express 5.2.1
環境
node
作成日
2026-08-17T01:50:52Z

よくある思い込み

req.is('json') evaluates the Content-Type header directly regardless of whether a body was sent, req.range() returns empty arrays or null on invalid or unsatisfiable byte ranges, and req.accepts() returns true for any media type mentioned in the Accept header.

このサンプルの作者が、ここで開発者やモデルが期待するであろうこととして記録したもの。下の契約が実際に実行されたものだ。

コントラクト

ファイル

検証済みアーティファクトをダウンロード (tar.gz) — 契約が実行された正確なバイト列

オリジンシーダー

csx-seed

検証レシート