The previous httptest.Server implementation called io.Copy(io.Discard, r.Body) before Hijack(), which caused a 3-minute hang: the handler blocked waiting to finish reading the request body while the HTTP client was blocked writing the body (waiting for response headers that the handler hadn't sent yet). This is a classic deadlock. Fix: match the existing a2a_proxy_test.go pattern — do NOT read r.Body before Hijack(). The HTTP parser has already consumed request headers; the body may still be in flight from the client. The server closes r.Body when the handler returns (server-managed), and conn.Close() after Hijack() fires RST/EOF to the client, which is the desired "connection drop" simulation. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| cmd | ||
| internal | ||
| migrations | ||
| pkg/provisionhook | ||
| .air.toml | ||
| .ci-force | ||
| .gitignore | ||
| .golangci.yaml | ||
| Dockerfile | ||
| Dockerfile.dev | ||
| Dockerfile.tenant | ||
| entrypoint-tenant.sh | ||
| go.mod | ||
| go.sum | ||