mirror of
https://github.com/tinygo-org/net.git
synced 2026-09-09 22:19:26 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user