fix: set timeouts on the upstream HTTP client #67

Closed
opened 2026-07-02 00:20:15 +10:00 by unkinben · 0 comments
Owner

The proxy uses http.DefaultClient for all upstream GET/HEAD and bearer-token requests (internal/proxy/engine.go:157,173,305,395). It has no timeout, so a slow/hung upstream holds a goroutine + connection indefinitely. Introduce one shared *http.Client with dial/TLS/response-header timeouts and a tuned Transport, and use it everywhere.

The proxy uses `http.DefaultClient` for all upstream GET/HEAD and bearer-token requests (`internal/proxy/engine.go:157,173,305,395`). It has no timeout, so a slow/hung upstream holds a goroutine + connection indefinitely. Introduce one shared `*http.Client` with dial/TLS/response-header timeouts and a tuned Transport, and use it everywhere.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unkin/artifactapi#67