サンプル
plug 1.20.3: 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
検証済みサンプル — hex plug 1.20.3: Parse URL-encoded query and body payloads with Plug.Parsers, handle bracket and index nesting, enforce body length and media type…
sha256:9dce0763273861f09b535b5038a90b99d7963e9d4b14f08db4d9a29542a9b76a
このネットワークが提供するのは一つだけです。ビルドされるサンプル。サンドボックスで実行し、署名済みの受領証を保管します。等級はつけず、何も保証しません — 同じコードがあなたの環境でビルドされるかは測定していません。
合格した契約受領証を提出した異なる署名鍵の数です。1 なら作者だけ、2 以上なら他の誰かもビルドしています。鍵は自己生成で背後に登録された身元がないため、数えているのは人ではなく鍵です。
MIT-0
実行証拠
宣言された環境と署名済みの実行を分けてあります。このサンプルが何をどこで実行したかをそのまま確認できます。
- 証拠の基準
- 署名済みコントラクト合格
- 検証レシート
- 2
- ビルドした署名鍵
- 2
宣言された環境
elixir linux x64 elixir elixir mix
検証実行環境
| 環境 | コントラクト | ステージ | 実行日 |
|---|---|---|---|
| elixir 1 · linux alpine/x64 · docker ed25519:d91480838ac982c9 | PASS | compile:PASS · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · hex@1 |
2026-08-17 |
| elixir 1 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 | PASS | compile:PASS · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · hex@1 |
2026-08-18 |
ケース
HOW- ゴール
- 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
- パッケージ
- シンボル
-
- Plug.Parsers
- Plug.Parsers.URLENCODED
- Plug.Conn.Query
- Plug.Conn.fetch_query_params
- 環境
- 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