샘플
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
- 운영체제
- linux
- 아키텍처
- x64
- 런타임
- elixir
- 언어
- elixir
- 패키지 매니저
- mix
검증 실행 환경
- 실행 컨텍스트
- elixir 1
- 운영체제
- 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