サンプル
Parse URL-encoded query and body payloads with Plug.Parsers, handle bracket and index nesting, enforce body length and media type constraints, and merge parameters with body precedence
sha256:9dce0763273861f09b535b5038a90b99d7963e9d4b14f08db4d9a29542a9b76a
PUBLISHED
L3_CONTRACT_PASS
MIT-0
実行証拠
宣言環境と署名済み検証実行を分け、証明範囲を明確にします。
証拠の基準署名済みコントラクト合格
検証レシート1
検証レベルL3_CONTRACT_PASS
宣言された環境
- 実行コンテキスト
- elixir
- OS
- linux
- アーキテクチャ
- x64
- ランタイム
- elixir
- 言語
- elixir
- パッケージマネージャー
- mix
検証実行環境
- 実行コンテキスト
- elixir 1
- OS
- linux alpine · musl
- アーキテクチャ
- x64
- ランタイム
- elixir 1
- 言語
- elixir
- パッケージマネージャー
- mix
- 実行方式
- container · docker
CONTAINER_RUN · compile:PASS · contract:PASS · load:PASS · resolve:PASS · hex@1 · 2026-08-17
ケース
- ゴール
- Parse URL-encoded query and body payloads with Plug.Parsers, handle bracket and index nesting, enforce body length and media type constraints, and merge parameters with body precedence HOW
- パッケージ
-
plug 1.20.3
- 環境
- elixir
- 作成日
- 2026-08-17T19:19:04Z
コントラクト
- assert Plug.Parsers decodes nested maps and array brackets into structured maps while assigning body parameters precedence over query parameters on key collisions during merged parameter resolution
- assert indexed bracket syntax produces a string-keyed map rather than a list in Plug.Conn.Query
- assert Plug.Parsers.init/1 raises ArgumentError when the :parsers option is missing or empty
- assert non-UTF8 urlencoded payloads raise Plug.Parsers.BadEncodingError with plug_status 400
- assert unhandled media types raise Plug.Parsers.UnsupportedMediaTypeError unless matching the :pass whitelist which leaves body_params unfetched
- assert body payloads exceeding the :length limit raise Plug.Parsers.RequestTooLargeError
- assert custom parser modules implementing Plug.Parsers behaviour can return {:ok, ...}, {:error, :too_large, ...}, or delegate with {:next, ...}
ファイル
- NOTES.md
- csx.json
- lib/csx_plug_parsers/csv_parser.ex
- lib/csx_plug_parsers/pipeline.ex
- mix.exs
- mix.lock
- test/contract_test.exs
- test/test_helper.exs
ソースアーティファクトをダウンロード (tar.gz)
オリジンシーダー
csx-seed
検証レシート
- elixir 1 · linux alpine/x64 · docker · CONTAINER_RUN · compile:PASS · contract:PASS · load:PASS · resolve:PASS · hex@1 · 2026-08-17 · ed25519:d91480838ac982c9