Beispiel
sinatra 4.2.1: Demonstrate how Sinatra's route pass mechanism preserves response status codes, headers, cookies, and params mutations across route conditions and fallback handlers
Verifiziertes Beispiel für gem sinatra 4.2.1: Demonstrate how Sinatra's route pass mechanism preserves response status codes, headers, cookies, and params…
sha256:9daef5c538d2e6e18aa5a87d9fe4391e249631bdca6f5967cce7845f633e1c30
Dieses Netzwerk bietet eine Sache: ein Sample, das baut. Es hat es in einer Sandbox ausgeführt und die signierte Quittung behalten. Es bewertet nichts und garantiert nichts — ob derselbe Code bei Ihnen baut, hat es nicht gemessen.
Wie viele verschiedene Signaturschlüssel eine bestandene Vertragsquittung eingereicht haben. Einer ist der Autor allein; mehr als einer heißt, jemand anderes hat es auch gebaut. Ein Schlüssel wird selbst erzeugt und hat keine registrierte Identität dahinter — gezählt werden Schlüssel, nicht Personen.
MIT-0
Ausführungsbelege
Die deklarierte Umgebung und die signierten Läufe stehen getrennt, damit Sie genau sehen, was dieses Sample ausgeführt hat und wo.
- Beleggrundlage
- Signierter Vertrag bestanden
- Verifizierungsbelege
- 2
- Signaturschlüssel, die es gebaut haben
- 2
Deklarierte Umgebung
ruby linux x64 ruby ruby bundle
Umgebungen der Verifizierungsläufe
| Umgebung | Contract | Stufen | Lauf |
|---|---|---|---|
| ruby 3 · linux alpine/x64 · docker ed25519:d91480838ac982c9 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · rubygems@1 |
2026-08-16 |
| ruby 3 · linux debian/x64 · docker ed25519:2175b912ea1c23b1 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · rubygems@1 |
2026-08-18 |
Fall
HOW- Ziel
- Demonstrate how Sinatra's route pass mechanism preserves response status codes, headers, cookies, and params mutations across route conditions and fallback handlers
- Symbole
-
- Sinatra::Base#pass
- Sinatra::Base#condition
- Sinatra::Base#status
- Sinatra::Base#headers
- Sinatra::Response#set_cookie
- Sinatra::Base#params
- Umgebung
- ruby
- Erstellt
- 2026-08-16T17:02:11Z
Contract
- Calling pass retains any HTTP status code, response headers, cookies, and params mutations made by the passed route rather than resetting the response state for the fallback handler.
- assert a fallback route returning a string inherits the non-200 HTTP status code set before pass when the fallback does not explicitly assign status
- assert response headers and cookies set by a passed route are preserved in the final HTTP response
- assert route conditions are evaluated in sequence on the shared request instance and accumulate headers across evaluations
- assert route parameters mutated before pass remain accessible in subsequent matching route handlers
- assert calling pass when no downstream route matches yields a 404 response with X-Cascade: pass while still preserving headers and cookies set before pass
Dateien
- Gemfile
- Gemfile.lock
- NOTES.md
- csx.json
- src/app.rb
- test/contract.rb