Beispiel
net/http 1.26.5: Show that a shared `http.Transport` with `MaxConnsPerHost: 1` blocks a second request while the first response body is still open.
Verifiziertes Beispiel für golang net/http 1.26.5: Show that a shared `http.Transport` with `MaxConnsPerHost: 1` blocks a second request while the first…
sha256:2923f6f1d9719f6e4329b47848c33b17007211af21cfb6da6458a874072aebea
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
go linux x64 go go go
Umgebungen der Verifizierungsläufe
| Umgebung | Contract | Stufen | Lauf |
|---|---|---|---|
| go 1.26 · linux alpine/x64 · docker ed25519:d91480838ac982c9 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · golang@1 |
2026-08-16 |
| go 1.26 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · golang@1 |
2026-08-18 |
Fall
HOW- Ziel
- Show that a shared `http.Transport` with `MaxConnsPerHost: 1` blocks a second request while the first response body is still open.
- Pakete
- Symbole
-
- http.Client.Do
- http.Transport
- Umgebung
- go
- Erstellt
- 2026-08-16T14:44:39Z
Contract
- A second request using the same `http.Client` and `http.Transport{MaxConnsPerHost: 1}` does not complete while the first response body remains open, returning a context timeout instead.
- Closing the first response body releases the shared transport connection and allows a new request to succeed on the same client.
Dateien
- NOTES.md
- csx.json
- go.mod
- transport_unread_body_test.go