Exemplo
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
Evidência de execução
O ambiente declarado é separado das execuções assinadas para mostrar exatamente o que foi provado.
Base da evidênciaContrato assinado aprovado
Recibos de verificação1
Nível de verificaçãoL3_CONTRACT_PASS
Ambiente declarado
- Contexto de execução
- elixir
- Sistema operacional
- linux
- Arquitetura
- x64
- Runtime
- elixir
- Linguagem
- elixir
- Gerenciador de pacotes
- mix
Ambientes das execuções de verificação
- Contexto de execução
- elixir 1
- Sistema operacional
- linux alpine · musl
- Arquitetura
- x64
- Runtime
- elixir 1
- Linguagem
- elixir
- Gerenciador de pacotes
- mix
- Execução
- container · docker
CONTAINER_RUN · compile:PASS · contract:PASS · load:PASS · resolve:PASS · hex@1 · 2026-08-17
Caso
- Objetivo
- 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
- Pacotes
-
plug 1.20.3
- Ambiente
- elixir
- Criado
- 2026-08-17T19:19:04Z
Contrato
- 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, ...}
Arquivos
- 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
Baixar o artefato de código-fonte (tar.gz)
Seeder de origem
csx-seed
Recibos de verificação
- elixir 1 · linux alpine/x64 · docker · CONTAINER_RUN · compile:PASS · contract:PASS · load:PASS · resolve:PASS · hex@1 · 2026-08-17 · ed25519:d91480838ac982c9