From 716cd91586c0d65c76e5e6b91799ff5dcaf1c340 Mon Sep 17 00:00:00 2001 From: Jeff Rose Date: Wed, 14 Jan 2026 23:15:36 -0800 Subject: [PATCH 1/4] Apply suggested fix to internal/infrastructure/wasm/hostfuncs/http.go from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- internal/infrastructure/wasm/hostfuncs/http.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/infrastructure/wasm/hostfuncs/http.go b/internal/infrastructure/wasm/hostfuncs/http.go index a8a3fbd..0e22da7 100644 --- a/internal/infrastructure/wasm/hostfuncs/http.go +++ b/internal/infrastructure/wasm/hostfuncs/http.go @@ -199,8 +199,8 @@ func executeHTTPRequest(ctx context.Context, req *http.Request, pluginName strin checker: checker, }, CheckRedirect: func(_ *http.Request, via []*http.Request) error { - if len(via) >= 10 { - return fmt.Errorf("stopped after 10 redirects") + if len(via) >= constants.DefaultMaxHTTPRedirects { + return fmt.Errorf("stopped after %d redirects", constants.DefaultMaxHTTPRedirects) } return nil }, From e5c746b2f982ae0b88ca0dd770f6707436382be3 Mon Sep 17 00:00:00 2001 From: Jeff Rose Date: Wed, 14 Jan 2026 23:15:36 -0800 Subject: [PATCH 2/4] Apply suggested fix to internal/infrastructure/wasm/hostfuncs/http.go from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- internal/infrastructure/wasm/hostfuncs/http.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/infrastructure/wasm/hostfuncs/http.go b/internal/infrastructure/wasm/hostfuncs/http.go index 0e22da7..e67f297 100644 --- a/internal/infrastructure/wasm/hostfuncs/http.go +++ b/internal/infrastructure/wasm/hostfuncs/http.go @@ -188,7 +188,7 @@ func executeHTTPRequest(ctx context.Context, req *http.Request, pluginName strin MaxIdleConns: 10, IdleConnTimeout: 90 * time.Second, TLSHandshakeTimeout: 10 * time.Second, - ExpectContinueTimeout: 1 * time.Second, + ExpectContinueTimeout: constants.DefaultHTTPExpectContinueTimeout, } client := &http.Client{ From 3b62008cfc1154afed7b6909bba599aff6a1b0aa Mon Sep 17 00:00:00 2001 From: Jeff Rose Date: Wed, 14 Jan 2026 23:15:37 -0800 Subject: [PATCH 3/4] Apply suggested fix to internal/infrastructure/wasm/hostfuncs/http.go from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- internal/infrastructure/wasm/hostfuncs/http.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/infrastructure/wasm/hostfuncs/http.go b/internal/infrastructure/wasm/hostfuncs/http.go index e67f297..c434dfc 100644 --- a/internal/infrastructure/wasm/hostfuncs/http.go +++ b/internal/infrastructure/wasm/hostfuncs/http.go @@ -186,7 +186,7 @@ func executeHTTPRequest(ctx context.Context, req *http.Request, pluginName strin baseTransport := &http.Transport{ ForceAttemptHTTP2: true, MaxIdleConns: 10, - IdleConnTimeout: 90 * time.Second, + IdleConnTimeout: constants.DefaultHTTPIdleTimeout, TLSHandshakeTimeout: 10 * time.Second, ExpectContinueTimeout: constants.DefaultHTTPExpectContinueTimeout, } From 9fddb42c7eb441e54ad3ad2b0bdc3f5b4ad7c51f Mon Sep 17 00:00:00 2001 From: Jeff Rose Date: Wed, 14 Jan 2026 23:15:37 -0800 Subject: [PATCH 4/4] Apply suggested fix to internal/infrastructure/wasm/hostfuncs/http.go from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- internal/infrastructure/wasm/hostfuncs/http.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/infrastructure/wasm/hostfuncs/http.go b/internal/infrastructure/wasm/hostfuncs/http.go index c434dfc..71c25f0 100644 --- a/internal/infrastructure/wasm/hostfuncs/http.go +++ b/internal/infrastructure/wasm/hostfuncs/http.go @@ -60,7 +60,10 @@ func (t *dnsPinningTransport) createPinnedTransport(validatedIP, port, hostname, pinnedTransport := t.base.Clone() pinnedTransport.DialContext = func(dialCtx context.Context, network, _ string) (net.Conn, error) { targetAddr := net.JoinHostPort(validatedIP, port) - dialer := &net.Dialer{Timeout: 30 * time.Second, KeepAlive: 30 * time.Second} + dialer := &net.Dialer{ + Timeout: constants.DefaultHTTPTimeout, + KeepAlive: constants.DefaultHTTPTimeout, + } return dialer.DialContext(dialCtx, network, targetAddr) }