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

验证回执