Closed
Description
I added a new tls.Config field in Issue #14376
https://tip.golang.org/src/crypto/tls/common.go#L384
but didn't know I needed to update cloneTLSConfig
https://tip.golang.org/src/net/http/transport.go#L2014
Is there a reason to not add a Clone method to tls.Config? Cloning that struct from another package seems brittle. transport.go has a comment about a race between transport.go and tls.Server -- that race seems more simply resolved if tls.Server clones the config before mutating it internally. (There's also no comment on tls.Server saying that it will mutate the provided config, which makes the behavior surprising.)
/cc @bradfitz