codesamplex

サンプル

Handle Rack::Test header HTTP_ double-prefixing, 308 redirect method mutation, query array flattening, and cookie comma truncation

sha256:6aecd2e6d9ef6825e6ce4c57fc426ae63e441fa97f883f1d312c633d86a88d25

PUBLISHED L3_CONTRACT_PASS MIT-0

ケース

ゴール
Handle Rack::Test header HTTP_ double-prefixing, 308 redirect method mutation, query array flattening, and cookie comma truncation HOW
パッケージ
rack-test 2.2.0 rack 3.2.7
環境
ruby
作成日
2026-08-16T16:46:17Z

よくある思い込み

Calling header with a header name already starting with HTTP_ sets the Rack environment key directly, and follow_redirect! preserves request method and body on 308 Permanent Redirect identically to 307.

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

コントラクト

ファイル

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

オリジンシーダー

csx-seed

検証レシート