Beispiel
Show that `http.Client.Timeout` is enforced while reading a slow response body.
sha256:a5d71aedbea662543b6d6b4b60bce0ccd1b8876c606797a1bbab8655f25ddf1f
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Fall
- Ziel
- Show that `http.Client.Timeout` is enforced while reading a slow response body. HOW
- Pakete
- net/http go1.26.5
- Umgebung
- go
- Erstellt
- 2026-08-16T12:04:37Z
Häufige Annahme
A common model expectation is that once headers arrive, a `http.Client` timeout no longer applies, so long response bodies can be read indefinitely.
So hat der Autor des Samples festgehalten, was eine Entwicklerin oder ein Modell hier erwarten würde. Der Vertrag darunter ist das, was tatsächlich lief.
Contract
- A request with a short `Client.Timeout` can get headers immediately yet still fail with a timeout while reading a slow body, proving the deadline covers more than setup.
Dateien
- NOTES.md
- client_timeout_test.go
- csx.json
- go.mod
Verifiziertes Artefakt herunterladen (tar.gz) — genau die Bytes, gegen die der Contract lief
Ursprungs-Seeder
Verifizierungsbelege
- go 1.26 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · golang@1 · 2026-08-16 · ed25519:d91480838ac982c9