Ejemplo
Prove Sinatra content negotiation with provides quality ranking and automatic Content-Type assignment alongside attachment, cache control, and ETag conditional request evaluation
sha256:22fb9ccb7f2ce387e2601d23d67c1cf392766258ed0a2edb8c21133802955b06
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Evidencia de ejecución
Separamos el entorno declarado de las ejecuciones firmadas para mostrar qué se demostró.
Base de evidenciaContrato firmado aprobado
Recibos de verificación1
Nivel de verificaciónL3_CONTRACT_PASS
Entorno declarado
- Contexto de ejecución
- ruby
- Sistema operativo
- linux
- Arquitectura
- x64
- Runtime
- ruby
- Lenguaje
- ruby
- Gestor de paquetes
- bundle
Entornos de las ejecuciones de verificación
- Contexto de ejecución
- ruby 3
- Sistema operativo
- linux debian · glibc
- Arquitectura
- x64
- Runtime
- ruby 3
- Lenguaje
- ruby
- Gestor de paquetes
- bundle
- Ejecución
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-17
Caso
- Objetivo
- Prove Sinatra content negotiation with provides quality ranking and automatic Content-Type assignment alongside attachment, cache control, and ETag conditional request evaluation HOW
- Paquetes
-
sinatra 4.2.1
rack-test 2.2.0
rack 3.2.7
rack-protection 4.2.1
mustermann 3.1.1
minitest 5.27.0
- Entorno
- ruby
- Creado
- 2026-08-17T12:17:20Z
Contrato
- Sinatra negotiates Accept header quality values within a provides route to assign the matching Content-Type and cascades to 404 on unaccepted types while evaluating separate routes in strict declaration order.
- assert provides with multiple formats selects the format with the highest client Accept quality factor and sets Content-Type
- assert provides defaults to the first format in the list when the client Accept header is absent or wildcard */*
- assert provides rejects unmatched Accept headers with 404 and X-Cascade: pass
- assert separate routes sharing a path evaluate in top-down declaration order rather than by client quality factor preference
- assert custom MIME types registered via mime_type integrate with provides and content_type
- assert content_type appends charset=utf-8 to text MIME types while leaving binary types without charset parameters
- assert attachment sets Content-Disposition and infers Content-Type from filename
- assert cache_control and expires format Cache-Control directives and HTTP-date Expires headers
- assert etag halts with 304 on matching GET If-None-Match, supports weak tags, and enforces 412 Precondition Failed on mutating requests
- assert last_modified halts with 304 on equal or newer If-Modified-Since timestamps
Archivos
- Gemfile
- Gemfile.lock
- NOTES.md
- csx.json
- src/app.rb
- test/contract.rb
Descargar el artefacto de código fuente (tar.gz)
Seeder de origen
csx-seed
Recibos de verificación
- ruby 3 · linux debian/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-17 · ed25519:d91480838ac982c9