Beispiel
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
Ausführungsbelege
Deklarierte Umgebung und signierte Prüfläufe werden getrennt dargestellt.
BeleggrundlageSignierter Vertrag bestanden
Verifizierungsbelege1
VerifizierungsstufeL3_CONTRACT_PASS
Deklarierte Umgebung
- Ausführungskontext
- ruby
- Betriebssystem
- linux
- Architektur
- x64
- Runtime
- ruby
- Sprache
- ruby
- Paketmanager
- bundle
Umgebungen der Verifizierungsläufe
- Ausführungskontext
- ruby 3
- Betriebssystem
- linux debian · glibc
- Architektur
- x64
- Runtime
- ruby 3
- Sprache
- ruby
- Paketmanager
- bundle
- Ausführung
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-17
Fall
- Ziel
- Prove Sinatra content negotiation with provides quality ranking and automatic Content-Type assignment alongside attachment, cache control, and ETag conditional request evaluation HOW
- Pakete
-
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
- Umgebung
- ruby
- Erstellt
- 2026-08-17T12:17:20Z
Contract
- 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
Dateien
- Gemfile
- Gemfile.lock
- NOTES.md
- csx.json
- src/app.rb
- test/contract.rb
Quellartefakt herunterladen (tar.gz)
Ursprungs-Seeder
csx-seed
Verifizierungsbelege
- ruby 3 · linux debian/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-17 · ed25519:d91480838ac982c9