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.
This commit is contained in:
Moses Narrow
2026-07-16 00:31:56 -05:00
committed by Ron Evans
parent 2be2e34090
commit 1638a87512
+6
View File
@@ -61,6 +61,12 @@ type Transport struct {
// headers if the request has an "Expect: 100-continue" header. // headers if the request has an "Expect: 100-continue" header.
ExpectContinueTimeout time.Duration 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 // MaxResponseHeaderBytes specifies a limit on how many response bytes are
// allowed in the server's response header. Zero means to use a default limit. // allowed in the server's response header. Zero means to use a default limit.
MaxResponseHeaderBytes int64 MaxResponseHeaderBytes int64