From 1638a8751255b9d3afe761b8633d94f90a79e91e Mon Sep 17 00:00:00 2001 From: Moses Narrow <36607567+0pcom@users.noreply.github.com> Date: Thu, 16 Jul 2026 00:31:56 -0500 Subject: [PATCH] net/http: add Transport.TLSHandshakeTimeout field for source compat The TinyGo net/http Transport was missing TLSHandshakeTimeout, so callers that set it (e.g. skywire's skysocks HTTPS-over-mesh client) fail to compile. Add the field; the TinyGo transport does the handshake inline so it is advisory, but it lets standard net/http source build unchanged under TinyGo. --- http/transport.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/http/transport.go b/http/transport.go index 9b6f790..1f7ac3c 100644 --- a/http/transport.go +++ b/http/transport.go @@ -61,6 +61,12 @@ type Transport struct { // headers if the request has an "Expect: 100-continue" header. ExpectContinueTimeout time.Duration + // TLSHandshakeTimeout specifies the maximum amount of time to + // wait for a TLS handshake. Zero means no timeout. + // Accepted for source compatibility with net/http; the TinyGo + // transport performs the handshake inline so this is advisory. + TLSHandshakeTimeout time.Duration + // MaxResponseHeaderBytes specifies a limit on how many response bytes are // allowed in the server's response header. Zero means to use a default limit. MaxResponseHeaderBytes int64